Access microphone in android 9 while the app is in the background

无人久伴 提交于 2021-02-17 05:24:07

问题


Android 9 limits the ability for background apps to access user input. If your app is running in the background on a device running Android 9, the system applies the following restrictions to your app:

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.


回答1:


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://stackoverflow.com/questions/63130222/access-microphone-in-android-9-while-the-app-is-in-the-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!