I am trying to using react-native-twilio-programmable-voice library for use Twilio voice call. I implemented library and setup code from server end I received access token and used this in below code:
initTwilio = async () => {
const token = await this.getAuthToken();
if (Platform.OS === 'android') {
await this.getMicrophonePermission();
}
await TwilioVoice.initWithToken(token);
TwilioVoice.addEventListener('deviceReady', () => {
console.log("device Ready");
this.setState({ twilioInited: true });
});
if (Platform.OS === 'ios') { //required for ios
TwilioVoice.configureCallKit({
appName: 'ReactNativeTwilioExampleApp',
});
}
};
makeCall = () => TwilioVoice.connect({ To: '+919929294578' });
When I press I didn't get "device ready" in output and nothing happened if anyone did that please advice so I can complete...Thanks!