React Native Android Voip Push Receiver
This package is for handling incoming voip push notifications on Android (for iOS, you can use this).
Prerequisites
This package listens for FCM messages dispatched by your sip server when an incoming call is about to be routed. It is assumed that you already have notification handling configured for firebase in your react-native app. If you haven't yet, then start here.
Getting started
$ npm install react-native-voip-push-receiver --save
Mostly automatic installation
$ react-native link react-native-voip-push-receiver
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.ReactNativeVoipPushReceiver.RNVoipPushReceiverPackage;
to the imports at the top of the file - Add
new RNVoipPushReceiverPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-voip-push-receiver' project(':react-native-voip-push-receiver').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-voip-push-receiver/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-voip-push-receiver')
In AndroidManifest.xml
... ...
Usage
; ... AndroidVoipPushReceiver;