Android Broadcast receivers are by default start in GUI thread (main thread) if you use RegisterReceiver(broadcastReceiver, intentFilter). But it can be run in a worker thread as follows; When using a HandlerThread, be sure to exit the thread after unregistering the BroadcastReceiver.
Which broadcast receivers are available in Android?
Android BroadcastReceiver
- android. …
- android.intent.action.BOOT_COMPLETED : This is broadcast once, after the system has finished booting.
- android.intent.action.CALL : To perform a call to someone specified by the data.
- android.intent.action.DATE_CHANGED : The date has changed.
- android.intent.action.REBOOT : Have the device reboot.
How does a broadcast receiver work in Android?
Broadcast in android is the system-wide events that can occur when the device starts, when a message is received on the device or when incoming calls are received, or when a device goes to an airplane mode, etc. Broadcast Receivers are used to respond to these system-wide events.