简体   繁体   English

在应用程序在后台时访问 android 9 中的麦克风

[英]Access microphone in android 9 while the app is in the background

Android 9 limits the ability for background apps to access user input. Android 9 限制了后台应用程序访问用户输入的能力。 If your app is running in the background on a device running Android 9, the system applies the following restrictions to your app:如果您的应用在运行 Android 9 的设备上在后台运行,系统会对您的应用应用以下限制:

Your app cannot access the microphone or camera.您的应用无法访问麦克风或摄像头。

Is there any way to access microphone in android 9 while the app is in the background.当应用程序在后台时,有什么方法可以访问 android 9 中的麦克风。

One more change was added in Android 9: only apps running in the 
foreground (or a foreground service) could capture the audio input.

Reference: https://developer.android.com/guide/topics/media/sharing-audio-input#pre-behavior参考: https://developer.android.com/guide/topics/media/sharing-audio-input#pre-behavior

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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