Android – Broadcast Reciever
What is broadcast receiver in android? A BroadcastReceiver is component of an Android that responds to system-wide broadcast announcements. It allows you to register for system or application events. When all registered receivers for an event are notified by the Android runtime once this event happens.
– types of broadcast receivers in android? – 1.Normal Broadcast – It is totally asynchronous broadcast. In normal broadcast, any receiver receives the broadcast, not any particular order.It use as sendBroadcast() method. This is efficient. Receivers cannot use the result.2.Ordered Broadcast – It is Completely synchronous broadcast. In Ordered Broadcast, the receiver receives the broadcast in priority base. One broadcast is delivered to one receiver at a time. Receivers can use the result. In fact, as each receiver executes, the result is passed to next receiver.It defined as sendOrderedBroadcast() method. 3.Local Broadcast – It is used only inside the application.
– Android broadcast receiver example – System Events Such us: the screen has turned off, the battery is low, or a picture was captured.