Skip to content

Commit 0cfc236

Browse files
authored
Merge pull request #832 from SanquezH/voip
feat: add VoIP with permission verification
2 parents f60e7d3 + 31e96f6 commit 0cfc236

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2842
-65
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ implement the API in the easiest way, depending on the current platform.
7272
| Text to speech ||||||
7373
| Unique ID ||||||
7474
| Vibrator ||| | | |
75+
| Voip ||| | | |
7576
| Wifi | | ||||
7677

7778
## Documentation

examples/voip/README.MD

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Kivy VoIP
2+
3+
## Table of Contents
4+
5+
- [Description](#description)
6+
- [Server](#server)
7+
- [Android](#android)
8+
- [iOS](#iOS)
9+
10+
## Description
11+
12+
Kivy VoIP is a simple, yet powerful framework designed for Kivy app developers to implement Voice Over IP (VoIP) functionality in their applications.
13+
It simplifies the process of setting up voice communication between users, allowing developers to integrate it easily into their Kivy apps.
14+
The main goal of this project is to provide a seamless VoIP experience, enabling direct communication between clients through an easily configurable server.
15+
Caution must be exercised by the developer to prevent sending data to the wrong IP address or root domain.
16+
17+
Key features:
18+
- Real-time voice communication.
19+
- Includes SSL/TLS support.
20+
- Easy integration with Kivy applications.
21+
- Supports Android and iOS platforms.
22+
23+
## Server
24+
25+
• To use the Kivy VoIP functionality, you will need to create a server application and configure it to route data sent by clients.
26+
For testing purposes, the VoIP servers in this repository's example are configured to echo data back to a connected client.
27+
Here is an outline of steps to run the VoIP server of your choosing from this repository:
28+
29+
1. If not already known, discover your server's local IP address by running "ipconfig" (Windows) or "ifconfig" (Linux) in your Command Line Interface (CLI).
30+
While the local port number is set to 8080 in the "node voip server.js" and echoServer.py files, you can change it to any available port as desired.
31+
32+
2. Use method A to utilize the python server or method B to utilize the node js server.
33+
34+
Method A:
35+
1. Download echoServer.py from this repository.
36+
2. Run the code anytime prior to attempting a VoIP call.
37+
38+
Method B :
39+
1. Download "node VoIP server.js" from this repository.
40+
2. If it is not installed already, install node.js on your operating system.
41+
3. Run the following command in your CLI to run the VoIP server when desired: node "node VoIP server.js".
42+
43+
## Android
44+
45+
1. Download main.py and buildozer.spec and place them in a folder that is solely used for this project.
46+
2. Within the start_call() function, update the dst_address and dst_port arguments in main.py to match your server's local IP address and port.
47+
All other arguments within the function are not required but may be assigned values as desired.
48+
3. Within your buildozer.spec file, ensure plyer is included.
49+
4. Within your buildozer.spec file, also ensure you have the following permissions before compiling with Buildozer:
50+
INTERNET, RECORD_AUDIO, ACCESS_NETWORK_STATE, and WAKE_LOCK.
51+
5. Compile main.py with Buildozer to incorporate pyjnius into the mobile application by default.
52+
6. Ensure microphone permission is enabled for the compiled mobile application on your phone.
53+
7. Ensure the node VoIP server is running.
54+
8. Run the compiled mobile application on your Android device and press the call button to hear your voice echoing back from the server.
55+
56+
## iOS
57+
58+
1. Download main.py and place it in a folder that is solely used for this project.
59+
2. Within the start_call() function, update the dst_address and dst_port arguments in main.py to match your server's local IP address and port.
60+
All other arguments within the function are not required but may be assigned values as desired.
61+
3. Through kivy-ios, utilize toolchain to create a new Xcode project that references the main.py folder.
62+
4. Using toolchain, install plyer.
63+
5. Open the project in Xcode and navigate to the project's directory explorer if not already selected.
64+
6. Under resources, click yourprojectname-info to load the info.plist file of your project.
65+
7. Hover over any description already set and press the add button to select "Privacy - Microphone Usage Description" to add microphone permission.
66+
8. To the right of the microphone permission added, enter a brief message to explain why microphone access is needed.
67+
This will appear during the permission request.
68+
9. Ensure the node VoIP server is running.
69+
10. Run the compiled mobile application on your iOS device and press the call button to hear your voice echoing back from the server.

0 commit comments

Comments
 (0)