Laerdal / Laerdal.Dfu

Xamarin binding library around @NordicSemiconductor's DFU library.
BSD 3-Clause "New" or "Revised" License
18 stars 16 forks source link

Android 14 Issue with DFU Update #54

Open ISSPRO-Eng opened 1 month ago

ISSPRO-Eng commented 1 month ago

I am running into an issue with running a DFU Update on an Android 14 device. This is the log of the error.

[DfuBaseService] Starting DFU service in foreground [CompatibilityChangeReporter] Compat change id reported: 160794467; UID 10371; state: ENABLED [gralloc4] @set_metadata: update dataspace from GM (0x00000000 -> 0x08010000) [gralloc4] @set_metadata: update dataspace from GM (0x00000000 -> 0x08010000) [AndroidRuntime] FATAL EXCEPTION: IntentService[DfuBaseService] [AndroidRuntime] Process: com.isspro.ev3_attribute_programmer, PID: 12111

[AndroidRuntime] android.app.MissingForegroundServiceTypeException: Starting FGS without a type callerApp=ProcessRecord{d6035e4 12111:com.isspro.ev3_attribute_programmer/u0a371} targetSDK=34

[AndroidRuntime] at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:53) [AndroidRuntime] at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:49) [AndroidRuntime] at android.os.Parcel.readParcelableInternal(Parcel.java:4882) [AndroidRuntime] at android.os.Parcel.readParcelable(Parcel.java:4864) [AndroidRuntime] at android.os.Parcel.createExceptionOrNull(Parcel.java:3064) [AndroidRuntime] at android.os.Parcel.createException(Parcel.java:3053) [AndroidRuntime] at android.os.Parcel.readException(Parcel.java:3036) [AndroidRuntime] at android.os.Parcel.readException(Parcel.java:2978) [AndroidRuntime] at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7214) [AndroidRuntime] at android.app.Service.startForeground(Service.java:775) [AndroidRuntime] at no.nordicsemi.android.dfu.DfuBaseService.startForeground(DfuBaseService.java:1926) [AndroidRuntime] at no.nordicsemi.android.dfu.DfuBaseService.onHandleIntent(DfuBaseService.java:1153) [AndroidRuntime] at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:77) [AndroidRuntime] at android.os.Handler.dispatchMessage(Handler.java:106) [AndroidRuntime] at android.os.Looper.loopOnce(Looper.java:230) [AndroidRuntime] at android.os.Looper.loop(Looper.java:319) [AndroidRuntime] at android.os.HandlerThread.run(HandlerThread.java:67)

It says I am starting a Foreground Service without a type. Is this something I need to declare in the Manifest? I already have the ForeGround Service added in my Manifest, but it seems there has a been a change with Android 14 to need a type as well. Just wondering if anyone knows the exact type to add to fix this issue?

ISSPRO-Eng commented 4 weeks ago

Anyone have updates?