-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Since 35 - there are new restriction on foreground services - manifest is changed but there are many crashes like this
FATAL EXCEPTION: main
Process: uk.co.sentinelweb.cuer.app.debug, PID: 21221
android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{8182577 u0 uk.co.sentinelweb.cuer.app.debug/uk.co.sentinelweb.cuer.app.service.cast.CastService c:uk.co.sentinelweb.cuer.app.debug}
at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2349)
at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2317)
at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2691)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8934)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Caused by: android.app.StackTrace: Last startServiceCommon() call for this service was made here
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:2056)
at android.app.ContextImpl.startForegroundService(ContextImpl.java:2010)
at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:860)
at uk.co.sentinelweb.cuer.app.service.cast.CastServiceManager.start(CastServiceManager.kt:12)
at uk.co.sentinelweb.cuer.app.ui.cast.CastController.switchToService(CastController.kt:84)
at uk.co.sentinelweb.cuer.app.ui.main.MainPresenter.onStop(MainPresenter.kt:86)
at uk.co.sentinelweb.cuer.app.ui.main.MainActivity.onStop(MainActivity.kt:262)
at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1747)