Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

[audiofileplayer] Problem with ZTE android phone #127

@csacchetti

Description

@csacchetti

I installed flutter 2.10.1 e upgraded all dependencies and compileSdkVersion to 31. Now when I install my app with audiofileplayer in a Samsun or ONEPLUS A3003 I’ve no problem but when I install the same app in ZTE the app crash when I use audioFilePlayer.
ZTE has Android 11
Samsung and ONEPLUS android 8

I've this exception:
E/AndroidRuntime(15970): FATAL EXCEPTION: main
E/AndroidRuntime(15970): Process: com.carlosacchetti.uprubiera_pro_new, PID: 15970
E/AndroidRuntime(15970): java.lang.RuntimeException: Unable to start service com.google.flutter.plugins.audiofileplayer.AudiofileplayerService@fb3da1c with Intent { cmp=com.carlosacchetti.uprubiera_pro_new/com.google.flutter.plugins.audiofileplayer.AudiofileplayerService }: java.lang.IllegalArgumentException: foregroundServiceType 0x00000002 is not a subset of foregroundServiceType attribute 0x00000000 in service element of manifest file
E/AndroidRuntime(15970): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4665)
E/AndroidRuntime(15970): at android.app.ActivityThread.access$2100(ActivityThread.java:291)
E/AndroidRuntime(15970): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2133)
E/AndroidRuntime(15970): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(15970): at android.os.Looper.loop(Looper.java:257)
E/AndroidRuntime(15970): at android.app.ActivityThread.main(ActivityThread.java:8333)
E/AndroidRuntime(15970): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(15970): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:603)
E/AndroidRuntime(15970): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/AndroidRuntime(15970): Caused by: java.lang.IllegalArgumentException: foregroundServiceType 0x00000002 is not a subset of foregroundServiceType attribute 0x00000000 in service element of manifest file
E/AndroidRuntime(15970): at android.os.Parcel.createExceptionOrNull(Parcel.java:2377)
E/AndroidRuntime(15970): at android.os.Parcel.createException(Parcel.java:2357)
E/AndroidRuntime(15970): at android.os.Parcel.readException(Parcel.java:2340)
E/AndroidRuntime(15970): at android.os.Parcel.readException(Parcel.java:2282)
E/AndroidRuntime(15970): at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7001)
E/AndroidRuntime(15970): at android.app.Service.startForeground(Service.java:755)
E/AndroidRuntime(15970): at com.google.flutter.plugins.audiofileplayer.AudiofileplayerService.onStartCommand(Unknown Source:21)
E/AndroidRuntime(15970): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4628)
E/AndroidRuntime(15970): ... 8 more
E/AndroidRuntime(15970): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime(15970): at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:1436)
E/AndroidRuntime(15970): at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1063)
E/AndroidRuntime(15970): at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:15954)
E/AndroidRuntime(15970): at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3201)
E/AndroidRuntime(15970): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3050)
E/AndroidRuntime(15970):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions