'android.app.ForegroundServiceDidNotStartInTimeException
I have defined target SDK Version 31. I only get this error on Android 12 devices. There are lots of crashes.
Service can be a little overworked. It is reading data from the database. Shows notifications under appropriate conditions. I am using Handler and Runnable in some places.
How can I fix this or at least find a way to ignore it?
android.app.ForegroundServiceDidNotStartInTimeException:
at android.app.ActivityThread.throwRemoteServiceException (ActivityThread.java:2143)
at android.app.ActivityThread.access$2900 (ActivityThread.java:310)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2372)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:226)
at android.os.Looper.loop (Looper.java:313)
at android.app.ActivityThread.main (ActivityThread.java:8633)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:567)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1135)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
