1. 开始发布到会话,注意Android操作系统现在报告应用程序正在使用摄像头和麦克风,这很好.

image

  1. 电话会议.onPause()后跟publisher.publishAudio=false.
  2. (可选)按Home按钮将应用程序移到后台.
  3. Android操作系统表明摄像头不再被使用,但应用程序仍在使用麦克风.

image

虽然它不会影响应用程序的可用性,但从用户隐私Angular 来看,它是不好的——用户可能认为应用程序在后台仍在录制音频,这很可怕.

有没有其他方法可以让我像摄像头一样完全关闭麦克风?

推荐答案

得到了Tokbox支持部门的回复,他们提供了一个可以正常工作的调整!

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.

Android相关问答推荐

长流与长流的比较<>

滚动屏幕时更改按钮外观

fillMaxHeight中的分数在列内不起作用(android jetpack compose)

如何在Jetpack composeH中创建具有弯曲末端的六边形形状

Android Kotlin ImageView内置于Kotlin ImageView中.适配器未按预期更新

Android布局渲染问题

是否可以附加事件处理程序,如onClick,拖动到Canvas Composable中绘制的内容,或使用drawBehind修饰符?

当 EditText 用于在 android studio 中将字符串发送到 firebase 时,仅允许安全调用错误

在单元测试下断言协程未完成

Compose 状态不是 recomposing

如何用jetpack compose实现垂直李克特量表

如何在 JetpackCompose 的 LazyColumn 中 Select 多个项目

try 使用 ViewPager2 实现滑动视图时出现类型不匹配错误

有人可以向我解释这两个结果有什么区别吗?

Android Studio 错误要求依赖它的库和应用程序针对 Android API 的 33 版或更高版本进行编译.

在 android list 中添加 IsMonitoringTool 元数据标志的位置

使用 Jetpack Compose 的深层链接导航到可组合项

多个项目 react-native android 构建错误

在 Android 10 (API 29) 中隐藏状态栏并在应用程序中使用其空间

Google API:java.lang.ClassNotFoundException:找不到类sun.misc.Service