Android 15 - Foreground Service with Microphone Crashes After Long Background Running - Stack Overflow

I am developing an Android app that runs a foreground service to track location and record audio contin

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]

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744105361a4558701.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信