react-native-incall-manager icon indicating copy to clipboard operation
react-native-incall-manager copied to clipboard

how to disable Proximity in voice call

Open jason-shen opened this issue 5 years ago • 8 comments

Hi All

i wonder if Proximity can be disable for voice calls, as when the screen goes off, the socket get disconnected by ios, as ios kill background activity

any help would be great

thanks advance

jason-shen avatar Jul 13 '20 08:07 jason-shen

Did you find any solution ?

CMLCNL avatar Jul 27 '20 18:07 CMLCNL

I did by changing the native code, but hoping to have a better solution though, the thing is the screen goes off then my socket connection gets cut off, so that's the reason I need it to be disable, not sure if anyone else experience that, if so what's the solution to go around that

jason-shen avatar Jul 27 '20 18:07 jason-shen

how you disable proximity

CMLCNL avatar Jul 27 '20 21:07 CMLCNL

how you disable proximity

Change the line in the native code to no instead of yes for the proximity

jason-shen avatar Jul 30 '20 13:07 jason-shen

how you disable proximity

Change the line in the native code to no instead of yes for the proximity

i disable this in ios. but not working on some android phones.

CMLCNL avatar Aug 05 '20 11:08 CMLCNL

how you disable proximity

Change the line in the native code to no instead of yes for the proximity

i disable this in ios. but not working on some android phones.

android u will have to do the same thing in the android native code, I haven't done android yet

jason-shen avatar Aug 06 '20 08:08 jason-shen

you can use InCallManager.stopProximitySensor()

rohitCodeBuddy avatar Sep 20 '23 13:09 rohitCodeBuddy

InCallManager.stopProximitySensor() seems not to stop the proximity sensor. Any suggestions?

I am using with expo in the managed flow, so not able to reach to the native code.

Edit: Tried this workaround:

setTimeout(() => {
	InCallManager.stopProximitySensor();
}, 10000);

Edit 2: Unfortunately the workaround is not working. Any comments?

MehmetKaplan avatar Mar 30 '24 13:03 MehmetKaplan