Gathering detailed insights and metrics for react-native-twilio-voice
Gathering detailed insights and metrics for react-native-twilio-voice
Gathering detailed insights and metrics for react-native-twilio-voice
Gathering detailed insights and metrics for react-native-twilio-voice
@twilio/voice-react-native-sdk
Twilio Voice React Native SDK
react-native-twilio-programmable-voice
React Native wrapper for Twilio Programmable Voice SDK
@islacel/react-native-twilio-programmable-voice
Forked React Native wrapper for Twilio Programmable Voice SDK
react-native-twilio-prog-voice
React Native wrapper for Twilio Programmable Voice SDK with version 5.2.0
npm install react-native-twilio-voice
Typescript
Module System
Node Version
NPM Version
Java (73.75%)
Objective-C (23.11%)
JavaScript (3.14%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
79 Commits
1 Forks
2 Watchers
3 Branches
3 Contributors
Updated on May 28, 2019
Latest Version
3.0.0
Package Id
react-native-twilio-voice@3.0.0
Size
76.27 kB
NPM Version
3.10.8
Node Version
6.9.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
This is a React Native wrapper for Twilio Programmable Voice SDK that lets you make and receive calls from your ReactNatvie App. This module is not curated nor maintained, but inspired by Twilio.
Before starting, we recommend you get familiar with Twilio Programmable Voice SDK. It's easier to integrate this module into your react-native app if you follow the Quick start tutorial from Twilio, because it makes very clear which setup steps are required.
npm install react-native-twilio-voice --save
react-native link react-native-twilio-voice
After you have linked the library with react-native link react-native-twilio-voice
check that libRNTwilioVoice.a
is present under YOUR_TARGET > Build Phases > Link Binaries With Libraries. If it is not present you can add it using the + sign at the bottom of that list.
Edit your Podfile
to include TwilioVoice framework
source 'https://github.com/cocoapods/specs'
source 'https://github.com/twilio/cocoapod-specs'
# min version for TwilioVoice to work
platform :ios, '8.1'
target <YOUR_TARGET> do
...
pod 'TwilioVoice', '=2.0.0-beta13'
...
end
run pod install
from inside your project ios
directory
The current iOS part of this library works through CallKit. Because of this the call flow is much simpler than on Android as CallKit handles the inbound calls answering, ignoring, or rejecting. Because of CallKit, the only event listeners present are "deviceReady", "connectionDidConnect", "connectionDidDisconnect", and "callRejected".
Twilio Programmable Voice for iOS utilizes Apple's VoIP Services and VoIP "Push Notifications" instead of FCM. You will need a VoIP Service Certificate from Apple to receive calls.
Setup FCM
You must download the file google-services.json
from the Firebase console.
It contains keys and settings for all your applications under Firebase. This library obtains the resource senderID
for registering for remote GCM from that file.
NOTE: To use a specific play-service-gcm
version, update the compile
instruction in your App's android/app/build.gradle
(replace 10.2.0
with the version you prefer):
1... 2 3buildscript { 4 ... 5 dependencies { 6 classpath 'com.google.gms:google-services:3.0.0' 7 } 8} 9 10... 11 12dependencies { 13 ... 14 15 compile project(':react-native-twilio-voice') 16 compile ('com.google.android.gms:play-services-gcm:10.2.0') { 17 force = true; 18 } 19} 20 21// this plugin looks for google-services.json in your project 22apply plugin: 'com.google.gms.google-services'
In your AndroidManifest.xml
1 ..... 2 3 <uses-permission android:name="android.permission.WAKE_LOCK" /> 4 <uses-permission android:name="android.permission.VIBRATE" /> 5 6 7 <application ....> 8 9 .... 10 11 <!-- Twilio Voice --> 12 <!-- [START fcm_listener] --> 13 <service 14 android:name="com.hoxfon.react.RNTwilioVoice.fcm.VoiceFirebaseMessagingService"> 15 <intent-filter> 16 <action android:name="com.google.firebase.MESSAGING_EVENT" /> 17 </intent-filter> 18 </service> 19 <!-- [END fcm_listener] --> 20 <!-- [START instanceId_listener] --> 21 <service 22 android:name="com.hoxfon.react.RNTwilioVoice.fcm.VoiceFirebaseInstanceIDService" 23 android:exported="false"> 24 <intent-filter> 25 <action android:name="com.google.android.gms.iid.InstanceID" /> 26 </intent-filter> 27 </service> 28 <!-- [END instanceId_listener] --> 29 <!-- Twilio Voice --> 30 31 ..... 32
In android/settings.gradle
1... 2 3include ':react-native-twilio-voice' 4project(':react-native-twilio-voice').projectDir = file('../node_modules/react-native-twilio-voice/android')
Register module (in MainApplication.java
)
1import com.hoxfon.react.RNTwilioVoice.TwilioVoicePackage; // <--- Import Package 2 3public class MainApplication extends Application implements ReactApplication { 4 5 private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 6 @Override 7 protected boolean getUseDeveloperSupport() { 8 return BuildConfig.DEBUG; 9 } 10 11 @Override 12 protected List<ReactPackage> getPackages() { 13 return Arrays.<ReactPackage>asList( 14 new MainReactPackage(), 15 new TwilioVoicePackage() // <---- Add the Package 16 ); 17 } 18 }; 19 .... 20}
1import TwilioVoice from 'react-native-twilio-voice' 2... 3 4// initialize the Programmable Voice SDK passing an access token obtained from the server. 5 6async function initTelephony() { 7 try { 8 const accessToken = await getAccessTokenFromServer() 9 const success = await TwilioVoice.initWithToken(accessToken) 10 } catch (err) { 11 console.err(err) 12 } 13} 14 // iOS Only 15function initTelephonyWithUrl(url) { 16 TwilioVoice.initWithTokenUrl(url) 17 try { 18 TwilioVoice.configureCallKit({ 19 appName: 'TwilioVoiceExample', // Required param 20 imageName: 'my_image_name_in_bundle', // OPTIONAL 21 ringtoneSound: 'my_ringtone_sound_filename_in_bundle' // OPTIONAL 22 }) 23 } catch (err) { 24 console.err(err) 25 } 26} 27 28 29// add listeners 30TwilioVoice.addEventListener('deviceReady', deviceReadyHandler) 31TwilioVoice.addEventListener('deviceNotReady', deviceNotReadyHandler) // Android Only 32TwilioVoice.addEventListener('deviceDidReceiveIncoming', deviceDidReceiveIncomingHandler) // Android Only 33TwilioVoice.addEventListener('connectionDidConnect', connectionDidConnectHandler) 34TwilioVoice.addEventListener('connectionDidDisconnect', connectionDidDisconnectHandler) 35TwilioVoice.addEventListener('callRejected', callRejected) // iOS Only 36 37... 38 39// start a call 40TwilioVoice.connect({To: '+61234567890'}) 41 42// hangup 43TwilioVoice.disconnect() 44 45// accept an incoming call (Android only) 46TwilioVoice.accept() 47 48// reject an incoming call (Android only) 49TwilioVoice.reject() 50 51// ignore an incoming call (Android only) 52TwilioVoice.ignore() 53 54// mute or un-mute the call 55// mutedValue must be a boolean 56TwilioVoice.setMuted(mutedValue) 57 58TwilioVoice.sendDigits(digits) 59 60// should be called after the app is initialized 61// to catch incoming call when the app was in the background 62TwilioVoice.getActiveCall() 63 .then(incomingCall => { 64 if (incomingCall){ 65 _deviceDidReceiveIncoming(incomingCall) 66 } 67 }) 68
react-native-push-notification
MIT
No vulnerabilities found.
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
binaries present in source code
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More