Sr. Android Developer Question:

Tell me what are broadcast receivers? How is it implemented?

Tweet Share WhatsApp

Answer:

► Broadcast Receiver is a mechanism using which host application can listen for System level events.
► Broadcast receiver is used by the application whenever they need to perform the execution based on system events. Like listening for Incoming call, sms etc.
► Broadcast receivers helps in responding to broadcast messages from other application or from the system.
► It is used to handle communication between Android operating system and applications.

It is implemented as a subclass of BroadcastReceiver class and each message is broadcaster as an Intent object.

public class MyReceiver extends BroadcastReceiver {
Public void onReceive(context,intent){}
}

Download Sr. Android Developer PDF Read All 15 Sr. Android Developer Questions
Previous QuestionNext Question
Explain me what is the life cycle of android activity?Tell me what is APK format?