remoteserviceexception

Context.startForegroundService() did not then call Service.startForeground()?

我的梦境 提交于 2019-12-20 20:15:18
问题 I have hundred of crashes reported by my users and I still can't find a fix for it. These crashes are coming from Android 8 (Samsung, Huawei, Google). I am getting these two crashes: Fatal Exception: android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground() at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1881) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android

Why do I get RemoteServiceException for creating/updating a notification?

删除回忆录丶 提交于 2019-12-12 07:54:52
问题 Background I have a spare time app that I've been working on for some years (here), and I try to handle as many crashes as I can (I hate seeing crash reports!). The problem One recent crash that seem quite new, is this one: android.app.RemoteServiceException: at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1768) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:6494)

startForegroundService() did not call startForeground(), but it did

柔情痞子 提交于 2019-12-09 10:06:52
问题 I'm having the Context.startForegroundService() did not then call Service.startForeground() in my Android service, but I cannot figure out why it is happening. My application is for media streaming, and this error only occurs when you pause from the foreground notification (turning it into a regular notification), and you then swipe the notification away, which is intended to stop my service. Here is the only method where the startForegroundService , startForeground and stopForeground methods

startForegroundService() did not call startForeground(), but it did

旧巷老猫 提交于 2019-12-03 13:00:20
I'm having the Context.startForegroundService() did not then call Service.startForeground() in my Android service, but I cannot figure out why it is happening. My application is for media streaming, and this error only occurs when you pause from the foreground notification (turning it into a regular notification), and you then swipe the notification away, which is intended to stop my service. Here is the only method where the startForegroundService , startForeground and stopForeground methods are called: private void configureServiceState(long action) { if (action == PlaybackStateCompat.ACTION

Why do I get RemoteServiceException for creating/updating a notification?

陌路散爱 提交于 2019-12-03 12:54:39
Background I have a spare time app that I've been working on for some years ( here ), and I try to handle as many crashes as I can (I hate seeing crash reports!). The problem One recent crash that seem quite new, is this one: android.app.RemoteServiceException: at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1768) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:6494) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.RuntimeInit