I can not access to microphone or camera while the call waked my app from killed state + lock screen
See original GitHub issueHi. After a lot of re-search inside issues. I still not find any solution for me.
My app using :
- PushKit VOIP to show incomming call
- React-native-callkeep to handle answer/end call
- React-native-webrtc to make the call
The problem is:
- With app state active/background. The call working normally
- Only with case app locked + app not running. I can not see the microphone in top of screen, then I think I can not access into the microphone(tested with audio call)
Only problem on case 3, about my code: I am getMediaDivices in useEffect() like this:
useEffect(() => {
if(isOutgoing){
// InCallManager.start({media: 'audio', ringback: '_DEFAULT_'})
InCallManager.start()
}
mounted.current = true
IdleTimerManager.setIdleTimerDisabled(true)
if(!isOutgoing && Platform.OS === 'android'){
RNCallKeep.backToForeground()
}
const handleBackButton = () => {
return true
}
BackHandler.addEventListener('hardwareBackPress', handleBackButton)
RNCallKeep.addEventListener('didActivateAudioSession' , audioSessionActivated)
getMediaStream()
return () => {
mounted.current = false
InCallManager.stop()
closeLocalStream()
IdleTimerManager.setIdleTimerDisabled(false)
BackHandler.removeEventListener('hardwareBackPress', handleBackButton)
if(!isOutgoing){
RNCallKeep.endCall(callUUID)
}
stopCall()
}
}, [])
Can u help me to know the problem? I dont know why the microphone does not show when calling in case 3
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Issues · react-native-webrtc/react-native-webrtc - GitHub
I can not access to microphone or camera while the call waked my app from killed state + lock screen. #1211 opened on...
Read more >How to add the mic and camera kill switches in Android 12
The mic and camera kill switches are ready for use. Tap either the mic or camera (or both) kill switches to disable the...
Read more >Request app permissions - Android Developers
When the user next opens your app and a feature in your app requests access to location, microphone, or camera, the user is...
Read more >Google Pixel Android 12 bugs, problems, & issues tracker ...
Here are all the Google Pixel Android 12 update bugs, problems, & issues that've been reported, fixed, or acknowledged (workarounds inside).
Read more >App Permissions on Android & How to Control Them - AVG
Android app permissions can give apps control of your phone and access to your camera, microphone, private messages, conversations, photos, and more.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://developer.apple.com/forums/thread/712817
I have seen similar reports on Apple’s forums, and it looks like you might need to wait until the phone is unlocked to start the call.