question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I can not access to microphone or camera while the call waked my app from killed state + lock screen

See original GitHub issue

Hi. After a lot of re-search inside issues. I still not find any solution for me.

My app using :

  1. PushKit VOIP to show incomming call
  2. React-native-callkeep to handle answer/end call
  3. React-native-webrtc to make the call

The problem is:

  1. With app state active/background. The call working normally
  2. 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:open
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
saghulcommented, Oct 25, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found