jefflinwood / twilio_client_phonegap

Phonegap plugins for the Twilio Client iOS and Android SDKs
MIT License
59 stars 53 forks source link

(Android) JS callbacks not being called after first run. #63

Open rapito opened 8 years ago

rapito commented 8 years ago

On android, js-twilio registered callbacks such as 'Twilio.Device.disconnect' only work the first time the app is run. Then if I close the app and open it again, I can make calls but the callbacks are no longer triggered.

To make it work again, I have to close the background threads/reinstall the app, and then the callbacks would work normally again.

I do notice the twilio callbacks on the android source are working though, because of the logs.

My guess is: that the js callbacks wont re-register with the android plugin for any reason.

Do you have any insights on how to solve this issue, or is there anyway I can force the js callbacks to renew/override the js callbacks on the running android plugin when I launch the app again?

jdejong commented 8 years ago

Wanted to send an update. We tried this fork (https://github.com/cale148/twilio_client_phonegap) and it appears to have fixes for android that resolved most of our issues. I don't see any open PR's from him but perhaps you could get him to create PR and bring in the fixes.

jefflinwood commented 8 years ago

Thanks! That one also has Marshmallow permissions, which is really nice.