7

I've been working on a React Native native plugin for Android that integrates Twilio. I forked rogchap's excellent plugin and built from that. I have had a difficult time with accepting calls using the Twilio SDK. My changes are located in this file:

https://github.com/jswilson/react-native-twilio/blob/develop/android/src/main/java/com/rogchap/react/modules/twilio/TwilioModule.java

I can successfully accept a Twilio call using this code, and the call works as expected, but when I disconnect the call, and the code attempts to emit an event over the bridge to javascript-world, I get a crash. It's actually not even the emit that causes the crash; if I dereference the DeviceEventEmitter at all, I get a crash (in my code above, I actually catch the disconnect event and just call toString(); this causes a crash). I should point out that I have checked for null, and the reference is fine. Any thoughts? This is the first time I've worked with a native plugin; is this symtopmatic of any common issues? I should note that this only occurs if I stay on the call for about 1.5 minutes. I'm running Android 5.0.2 on a Samsung S6. Thanks!

virty4
  • 129
  • 4
  • Is this code working? – Biplab De Sep 26 '16 at 12:26
  • @virty i am trying to implement calling using twilio in react native app . but its does not work for me . here is my issue http://stackoverflow.com/questions/39716782/twilio-call-is-not-working-in-ios-and-android-in-react-native can you help on – Sport Sep 27 '16 at 06:06
  • https://stackoverflow.com/questions/39653677/how-to-integrate-twilio-in-react-native-for-android/39752727#39752727 – Biplab De Aug 04 '17 at 09:51

0 Answers0