Built in the main thread of the UI, no time-consuming operation;
Short life cycle, mainly to play a transitional role;
Target components: Notification, Activity, Service;
Two ways of registering:
(1) Dynamic registration, usually in Onresume () call Context.registerreceiver () registration, in OnPause () call Unregisterreceiver () logoff;
(2) static registration, registration in the registration document;
Usually, the event of high trigger rate is not suitable for static registration;
The broadcasts sent are divided into ordinary broadcasts and ordered broadcasts:
(1) General broadcasting: All receivers registered with the broadcast are allowed to receive the broadcast;
(2) Orderly broadcast: The receiver's priority is arranged to accept the broadcast, the recipient with high priority can terminate the broadcast (Broadcastreceiver.abortreceiver ()) and can add additional data during propagation ( Broadcastreceiver.setresult ()), after which the recipient can receive the data and process it (Broadcasereceiver.getresultdata ());
Android Essentials--broadcastreceiver