简体   繁体   中英

Android device shows microphone is actively being used even though session is paused and audio is disabled

  1. Start publishing to a session, notice that Android OS now reports that camera and microphone is being used by the app, which is fine.

图片

  1. Call session.onPause() followed by publisher.publishAudio = false.
  2. (Optional) Move application into background by pressing Home button.
  3. Android OS indicates that camera is no longer being used, but microphone is still being used by the application.

图片

Although it does not affect usability of the app it is bad in terms of user privacy perspective - the user might think the app is still recording audio while it is in background, which is scary.

Is there other methods I can call to turn off the microphone access totally, just like the camera?

Got a reply from Tokbox support and they provided a tweak that works as expected!

For your use case, where you don't want to retain the audio access when the app goes into the background, you can try to call AudioDeviceManager.getAudioDevice().stopCapturer() to stop the capturer and it will remove the microphone access. If you do this, please make sure to call AudioDeviceManager.getAudioDevice().startCapturer() when the app comes in the foreground.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM