Android App crashes with "android.app.RemoteServiceException: can't deliver broadcast" exception on Samsung Phones
Asked Answered
G

1

0

My app crashes after a while (After running OK for more than 12h) with stacktrace as mentioned below:

android.app.RemoteServiceException: can't deliver broadcast
android.app.ActivityThread$H.handleMessage ActivityThread.java:1881
android.os.Handler.dispatchMessage Handler.java:105
android.os.Looper.loop Looper.java:164
android.app.ActivityThread.main ActivityThread.java:6938
java.lang.reflect.Method.invoke Method.java
com.android.internal.os.Zygote$MethodAndArgsCaller.run Zygote.java:327

The app does not have an app specific Broadcasts but registers for Location, Bluetooth and Network related system broadcasts. The broadcasts are registered in onResume of Activity and unregistered in onPause. As mentioned the crash occurs only after app has been running for more than 10 hours. Also so far the issue has occurred only on Samsung Galaxy S8 phones.

I've checked and followed all the fixes mentioned in below stackoverflow thread: Fatal Exception: android.app.RemoteServiceException: can't deliver broadcast at android.os.Handler.dispatchMessage

Please let me know if someone has had this issue or any pointers towards how this can be fixed!

/Amit

Guiltless answered 4/6, 2018 at 13:5 Comment(0)
G
1

If anyone has this issue, One of the reason is that App is "Out of memory" but for some reason, on Samsung phones App crashes with "Not able to deliver broadcast" exception. So check for memory fragmentation if you are still having this issue after you have looked and implemented all the solutions mentioned for this exception.

Guiltless answered 24/7, 2018 at 9:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.