You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DFU Bootloader version (please complete the following information):
SDK version: 31
Library version: 1.12.0
Device information (please complete the following information):
Device: Any device running Android 8 or higher
Describe the bug
From time to time we are facing this crash (Android 8 and up due to changes with services). Basically the App is in background and tries to start a service.
So startForegroundService won't work there, rather WorkManager should be used
Indeed, WorkManager should be used. The library was created long before the first WorkManager existed in a way that it would have to be rewritten separating transport and runner.
You may also disable starting service as foreground at all by setting this to false:
DFU Bootloader version (please complete the following information):
Device information (please complete the following information):
Describe the bug
From time to time we are facing this crash (Android 8 and up due to changes with services). Basically the App is in background and tries to start a service.
The affected LOC is: no.nordicsemi.android.dfu.DfuBaseService.onHandleIntent (DfuBaseService.java:1413)
(Note: It crashes on all startService calls, so not only the one I picked here)
I think changing it to:
would probably solve it.
Is there anything speaking against it?
I just checked for Android 12 and up there are unfortunately more restrictions: https://developer.android.com/about/versions/12/behavior-changes-12#foreground-service-launch-restrictions
So startForegroundService won't work there, rather WorkManager should be used
The text was updated successfully, but these errors were encountered: