当应用程序在后台时访问android 9中的麦克风 [英] Access microphone in android 9 while the app is in the background
本文介绍了当应用程序在后台时访问android 9中的麦克风的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Android 9 限制了后台应用访问用户输入的能力.如果您的应用在运行 Android 9 的设备上在后台运行,系统会对您的应用应用以下限制:
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.
当应用程序在后台时,有什么方法可以在 android 9 中访问麦克风.
Is there any way to access microphone in android 9 while the app is in the background.
推荐答案
One more change was added in Android 9: only apps running in the
foreground (or a foreground service) could capture the audio input.
参考:https://developer.android.com/guide/topics/media/sharing-audio-input#pre-behavior
这篇关于当应用程序在后台时访问android 9中的麦克风的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文