Explicit Addressing An Intent To A Dynamically Broadcast Receiver
i am new to Android and trying to understand the communication between apps. I am trying to write 3 little apps which can communicate with each other. If you want to sent a message
Solution 1:
It does not appear possible to send an explicit intent to a dynamically registered broadcast receiver. Registering the receiver in AndroidManifest.xml is the only way.
If you dynamically register a BroadcastReceiver – by calling Context.registerReceiver() – you supply a BroadcastReceiver instance ... If you try to send an Intent to the receiver by naming the class of the BroadcastReceiver, it will never get delivered .. The Android system will not match the Intent you declared to the class of the BroadcastReceiver instance you registered.
Source: http://onemikro2nd.blogspot.com/2013/09/darker-corners-of-android.html
Post a Comment for "Explicit Addressing An Intent To A Dynamically Broadcast Receiver"