admin管理员组

文章数量:1394991

I am developing an Android app that runs a foreground service to track location and record audio continuously on an Android 15 (Motorola) device.

The service works fine when started, but after approximately 12 hours, the system stops my background service with the following error:

Unable to create service com.resq.resqapp.FService: 
java.lang.SecurityException: Starting FGS with type microphone 
callerApp=ProcessRecord{e7fc43d 14206:com.resq.resqapp/u0a845} targetSDK=34 
requires permissions: all of the permissions allOf=true 
[android.permission.FOREGROUND_SERVICE_MICROPHONE] any of the permissions 
allOf=false [android.permission.CAPTURE_AUDIO_HOTWORD, 
android.permission.CAPTURE_AUDIO_OUTPUT, 
android.permission.CAPTURE_MEDIA_OUTPUT, 
android.permission.CAPTURE_TUNER_AUDIO_INPUT]

本文标签: Android 15Foreground Service with Microphone Crashes After Long Background RunningStack Overflow