Need to add walkie talkie or push-to-talk functionality to your Android app?
Worry no more! You can add it quickly with VoicePing Android SDK that works together with VoicePing Open Source Router.
Simple integration, customizable, and free! What are you waiting for? 🎉
VoicePing Android SDK is an Android library, provided by Smart Walkie Talkie, for enabling Push-To-Talk (PTT) functionality to your Android project. It allows you to quickly add group voice broadcast capability to your app. VoicePing Android SDK comes with a reference Android App (with UI) that demonstrates the one button Push-To-Talk interface.
You can test our sample app here: Download VP Demo app. The sample app allows you to test the Walkie Talkie function. You will need at least two android devices to test properly.
You can input any user ID and company name. To communicate, devices should have same company name but different user ID.
If you need more detailed info, you can have a look at VoicePing walkie talkie Push-to-Talk (PTT) sdk documentation page.
Check out the Introduction page for a quick review.
- Easy to integrate to your app
- Low data consumption suitable for Mobile Devices: Opus Codec, defined as 16Khz, 60ms Frame size. ~300KB per 1 minute of speech.
- Works over all network conditions (2G, 3G, 4G or Wifi)
- Auto-reconnect feature when Internet connection is lost
- Uses secure WebSocket for transport
- Works for Android SDK (21 to 37) and Android OS version 5.0 to 17
- Low battery consumption
- An Uber like application can connect a group of drivers together based on their location or zipcode
- For Enterprise applications like housekeeping applications, allow a group call to all housekeepers on a certain floor (level) of the hotel
- For SOS apps, activate voice broadcast if a user is in distress
- For Chat Apps, allow some users to send instant voice messages that do not need to be manually played.
To install this SDK in your Android project, you need to do the following steps,
-
Add jitpack to your project-level gradle file:
allprojects { repositories { ... maven { url "https://jitpack.io" } } } -
Add the module on your module-level gradle file:
dependencies { implementation 'com.github.SmartWalkieOrg:VoicePing-Walkie-Talkie-AndroidSDK:1.2.0' } -
Sync gradle and use it
The SDK compiles against and targets Android 17 (API level 37), with minSdk 21 (Android 5.0).
Starting with Android 17, audio playback and audio focus requests from an app that is not visible are blocked unless the app has a foreground service with while-in-use capabilities running. For a walkie talkie app this means: without a foreground service, incoming PTT audio is silently muted as soon as your app goes to the background.
The SDK itself is service-free by design — your app must run a foreground service while
connected to VoicePing. The demo app ships a reference implementation in
PttForegroundService.
To adopt it in your app:
-
Declare the service and permissions in your manifest:
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" /> <service android:name=".YourPttForegroundService" android:exported="false" android:foregroundServiceType="mediaPlayback|microphone" />
-
Start the service while your app is visible (required for the
microphonetype on Android 14+), right afterVoicePing.connect(...), and stop it afterVoicePing.disconnect(...). -
Request
POST_NOTIFICATIONSon Android 13+ so the user can see the ongoing notification.
- The demo app requests audio focus with
AudioFocusRequestand plays incoming PTT audio throughAudioTrackwithUSAGE_MEDIA/CONTENT_TYPE_SPEECHattributes. - If your server URL points to a device on the local network (e.g. a self-hosted router on
the LAN), apps targeting API 37 must also request the
ACCESS_LOCAL_NETWORKruntime permission. Connections to Internet hosts are unaffected.
VoicePing Walkie Talkie Android SDK needs a VoicePing Router Server to work. You can test with our hosted server.
The public server URL: wss://router-lite.voiceping.info
If you need to self-host the server, you can find more documentation on the server repo:
VoicePing Enterprise is the full featured closed source version with support. More features available are https://www.voicepingapp.com. You can try VoicePing on:
Join the same free channel ID and try PTT from the web to the Android/iOS app and vice versa. You will find VoicePing has very clear audio and low latency1.
VoicePing Enterprise has more features than VoicePing Open Source which can be found here: https://www.voicepingapp.com/blog/design-a-stunning-blog
Android Supported: Android 5 to Android 11 supported. With or Without Google Services.
iPhone Supported: iPhone version available. Runs in Background to allow for Real Time receiving of PTT.
Desktop Version: Web Based version to connect office and field workers.
If you would like help on server setup, maintenance, customization, please contact us at sales@smartwalkietalkie.com. VoicePing Enterprise is also available for customisation, rebranding and source code purchase.
[1] Latency: time between someone talks in a device until the other hears the audio on other device