音视频语音通话过程崩困,在 Android Redmi K50 设备上出现 语音通话 3 分钟左右崩溃

李飞 28天前 151

java.lang.RuntimeException: Unable to start service cn.wildfire.chat.kit.voip.VoipCallService@59488ff with Intent { cmp=uni.UNI51E368D/cn.wildfire.chat.kit.voip.VoipCallService (has extras) }: java.lang.SecurityException: Starting FGS with type microphone callerApp=ProcessRecord{5b567de 12334:uni.UNI51E368D/u0a62} 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.permission.CAPTURE_VOICE_COMMUNICATION_OUTPUT, android.permission.RECORD_AUDIO]  and the app must be in the eligible state/exemptions to access the foreground only permission
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5139)
    at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2476)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:222)
    at android.os.Looper.loop(Looper.java:314)
    at android.app.ActivityThread.main(ActivityThread.java:8788)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1090)
Caused by: java.lang.SecurityException: Starting FGS with type microphone callerApp=ProcessRecord{5b567de 12334:uni.UNI51E368D/u0a62} 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.permission.CAPTURE_VOICE_COMMUNICATION_OUTPUT, android.permission.RECORD_AUDIO]  and the app must be in the eligible state/exemptions to access the foreground only permission
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3079)
    at android.os.Parcel.createException(Parcel.java:3063)
    at android.os.Parcel.readException(Parcel.java:3046)
    at android.os.Parcel.readException(Parcel.java:2988)
    at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7310)
    at android.app.Service.startForeground(Service.java:862)
    at androidx.core.app.V$c.a(SourceFile:11)
    at androidx.core.app.V.a(SourceFile:7)
    at cn.wildfire.chat.kit.voip.VoipCallService.onStartCommand(SourceFile:62)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5121)
... 9 more![](http://bbs.wildfirechat.cn/upload/images/202511/21_19_28_19542)
最新回复 (7)
  • x86 28天前
    引用 2

    请你用本地插件,测试下这个版本

    上传的附件:
  • x86 28天前
    引用 3
    你将在线插件下载下来,然后替换 2 楼的对应文件,之后 hbuilder x 里面使用本地插件,重新打包验证
  • 李飞 27天前
    引用 4
    我这个是 Android 原生的项目,只是暂时和 uniapp 项目使用了同一个包名。能针对原生 Android 项目给我一个测试.aar 文件么?
  • 李飞 27天前
    引用 5
    是 Android 原生项目,不是 uniapp 项目
  • x86 27天前
    引用 6
    安卓项目的话,更新带最新代码就可以了
  • 李飞 26天前
    引用 7
    我们改动太多,不敢直接替换,想知道具体改了哪些地方,缩小一下替换范围。我看 github 里也有人提这个问题,我们现在能重现了。 是在应用刚装上,第一次接收语音通话的时候会崩溃。目前测试的荣耀 400,红米系列有看到
  • x86 26天前
    引用 8
    https://github.com/wildfirechat/android-chat/commit/394e6587a74747f776fd65d143068ba1e289b275

    看下这个提交
返回