Question:
How do I set up Android VoIP pushes?
Answer:
Pushwoosh supports VoIP-style call notifications on Android. They are provided by a separate pushwoosh-calls module, which builds a native incoming-call UI on top of the Android telecom stack instead of a regular notification.
Setup outline:
- Add the
pushwoosh-callsdependency to your Android project (or use the corresponding cross-platform plugin). - Request the call-related runtime permissions from the user. On Android the system permission dialog is shown only once, so check the current state with
getCallPermissionStatusbefore callingrequestCallPermission. - Implement the
CallEventListenerinterface to react to incoming call events and their lifecycle. - Send the call from the API by adding the
voipparameter to your/createMessagerequest. Optional parameters includecallerName,videoandsupportsHolding.
Full instructions: VoIP calls on Android. For Cordova, see Cordova VoIP Calls; for iOS, see VoIP pushes.
Note for Cordova users: the VoIP module added in plugin version 8.3.40 also adds call-related permissions (FOREGROUND_SERVICE_PHONE_CALL, MANAGE_OWN_CALLS) to your manifest. If you do not use the feature, see the article on removing those permissions before submitting to Google Play.
Comments
0 comments
Please sign in to leave a comment.