react-native-webrtc / react-native-callkeep

iOS CallKit framework and Android ConnectionService for React Native
ISC License
889 stars 432 forks source link

Ask the user to unlock the screen #392

Open vijayakm opened 3 years ago

vijayakm commented 3 years ago

Hello everyone,

When the user answer the incoming call and the phone is locked, is it possible to ask the user to unlock his phone in order to open my app ? Like WhatsApp, when there is a VideoCall, the phone must be unlock to answer the call

jonastelzio commented 3 years ago

Doing so would require running in self managed mode. There is a pull request for that in the making:

https://github.com/react-native-webrtc/react-native-callkeep/pull/395

It basically requires you to provide your own incoming call ui, meaning it's not just something you just enable and call it a day.

You can read more about what's required here: https://developer.android.com/guide/topics/connectivity/telecom/selfManaged

timorss commented 2 years ago

Don't unlock the phone. Show the app when locked

Add this to the android manifest

android:showWhenLocked="true" android:turnScreenOn="true"

example: <activity android:showWhenLocked="true" android:turnScreenOn="true" ...................

IOS i didn't find a solution yet