Is there anything wrong with sending a broadcast in a broadcast receiver?
Retrieve the current result extra data, as set by the previous receiver. This can be called by an application in onReceive(Context, Intent) to allow it to keep the broadcast active after returning from that function.
To receive SMS messages, use the onReceive() method of the BroadcastReceiver class. The Android framework sends out system broadcasts of events such as receiving an SMS message, containing intents that are meant to be received using a BroadcastReceiver.
Currently there is no way to check if a receiver is registered using the receiver reference. You have to unregister the receiver and catch the IllegalArgumentException that is thrown if it's not registered. This is ugly, and a boolean method to check if it's registered would be helpful.
Register Broadcast: Statically (manifest-declared) - This receiver can be registered via the AndroidManifest. xml file.
I don't think there is any problem with sending a broadcast again from within a BroadcastReceiver.
You can see similar example here.
To study more about broadcast receivers plese see the following.
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