Repository navigation
Multiple fixes on Android - #724
Conversation
|
@manuquentin Can you please check this? Thanks |
|
Thanks @saif-o99 , can you please add documentation about the new event ? |
|
@manuquentin Done |
|
hey @manuquentin , is this gonna be merged soon? |
The use of TelephonyCallback was introduced in react-native-webrtc#724. This is only supported on Android SDK v31+.
The use of TelephonyCallback was introduced in react-native-webrtc#724. This is only supported on Android SDK v31+.
|
@saif-o99, @manuquentin, the new |
Sorry to hear that, but the default behaviour of any app is that when you kill the app you kill everything related to it. |
|
@saif-o99 Speaking for myself, this behavior is unexpected and likely affects others as well. Throughout the library's existence, the behavior has been consistent, and its sudden change without announcement is surprising. I utilize foreground services not only for calls, so it's critical for me that the activity isn't completely killed after closing the app. The foreground service is designed to continue functioning even when the app is closed. Why does a library responsible only for calls override the behavior of the entire application? |
The use of TelephonyCallback was introduced in react-native-webrtc#724. This is only supported on Android SDK v31+. (cherry picked from commit 7f7ff14)
… is optional onHostDestroy (added by upstream PR react-native-webrtc#724) ended every call and then called Process.killProcess. The kill ran right after onDisconnect(), before the posted endCall broadcast reached JavaScript, so the app never hung up its own media/signalling leg: pressing Back mid-call left the remote call up. It also crashed the instrumentation runner (react-native-webrtc#797), and users of react-native-webrtc#724 asked for the behaviour to be optional. Never kill the process. Ending the calls stays the default, now with the endCall event delivered; setup({ android: { endCallsOnHostDestroy: false } }) keeps calls running without the activity, as Telecom allows for a self-managed call. Off-device test that the module no longer references killProcess and that the setting defaults to true. Typings and README. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The use of TelephonyCallback was introduced in react-native-webrtc#724. This is only supported on Android SDK v31+. (cherry picked from commit 7f7ff14)
This PR deliver some fixes & new code
1-
checkIsInManagedCallwas added to check if there is a native active call in android, in my case this was useful to check if there is a native active call, prevent app from making a call2-
onHasActiveCallwas added to tell the JS side about native call status, in my case this covered the case where you are in an app call then you accept a native call, this will trigger this event which i end the call by it. so no two calls be on the same time. before, the two calls were running at the same time3- change in VoiceConnectionService.java is to fix #625
4-
onHostDestroyhas been added to stop all calls and processes when app is killed