Android设备显示,即使暂停了会话并禁用了音频,也正在积极使用麦克风

发布于 2025-01-18 01:22:33 字数 366 浏览 4 评论 0原文

  1. 开始发布会话,请注意,Android OS现在报告说,该应用程序正在使用相机和麦克风,这很好。

  1. ” = false。
  2. (可选)通过按Home按钮将应用程序移动到背景中。
  3. Android OS表示不再使用相机,但是应用程序仍在使用麦克风。

=“ https://user-images.githubusercontent.com/5056279/1609662-53F9D027-F9D027-F078-43AE-43AE-92BE-3B5E487459D5.PNG

像相机一样,我还能打电话给其他方法以完全关闭麦克风访问吗?

  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.

image

  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.

image

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

演多会厌 2025-01-25 01:22:33

收到了Tokbox支持的答复,他们提供了一种按预期工作的调整!

对于您的用例,您不想保留音频访问
当应用进入后台时,您可以尝试致电
audiodevicemanager.getaudiodevice()。stopcapturer()停止
捕获者将删除麦克风访问。如果这样做,
请确保致电
audiodevicemanager.getaudiodevice()。startCapturer()应用程序到达
在前景中。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文