My app includes a service which receives locations via broadcasts, and there is also an activity that registers for those same broadcasts. Intermittently, and apparently only on some devices, the activity blows up with this:
class java.lang.RuntimeException Msg: Error receiving broadcast Intent { act=com.company.app.ACTION_LOCATION_CHANGED flg=0x10 (has extras) } in com.company.app.library.activity.MyActivity$LocationReceiver@40f45bb8
I cannot use the debugger to look at the app's state as I cannot reproduce this error, so I'm reliant on analytics logs.
What does this exception actually mean? i.e. what is the problem in receiving it?
Broadcast intents are a mechanism by which an intent can be issued for consumption by multiple components on an Android system. Broadcasts are detected by registering a Broadcast Receiver which, in turn, is configured to listen for intents that match particular action strings.
A broadcast receiver (receiver) is an Android component which allows you to register for system or application events. All registered receivers for an event are notified by the Android runtime once this event happens.
An intent is a messaging object, a broadcast receiver is an app component. An intent is used to request some action from some app component, it could be a broadcast receiver, an activity or a service.
description: Declares a broadcast receiver (a BroadcastReceiver subclass) as one of the application's components. Broadcast receivers enable applications to receive intents that are broadcast by the system or by other applications, even when other components of the application are not running.
This means that there is an uncaught exception inside onReceive method. Take a look on what can cause it... difficult to say without code and without more detailed stacktrace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With