twilio_client_phonegap icon indicating copy to clipboard operation
twilio_client_phonegap copied to clipboard

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

Open rapito opened this issue 8 years ago • 2 comments

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?

rapito avatar Jun 09 '16 23:06 rapito

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.

jdejong avatar Jun 13 '16 11:06 jdejong

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

jefflinwood avatar Jun 13 '16 17:06 jefflinwood