Twilio语音呼叫无法在本机反应

时间:2019-01-24 04:43:23

标签: react-native twilio-click-to-call

我正在尝试使用react-native-twilio-programmable-voice库来使用Twilio语音呼叫。我从服务器端实现了库和设置代码,我收到了访问令牌,并在以下代码中使用了该代码:

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' });

当我按时,我的输出没有“准备好设备”,如果有人这样做,什么也没发生,请告知我,以便我完成...谢谢!

0 个答案:

没有答案