APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : SEMESTER 6

Year : 2018

Term : MARCH

Scheme : 2015 Full Time

Course Code : EC 312

Page:20





PDF Text (Beta):

A broadcast receiver is implemented as a subclass of BroadcastReceiver class and overriding the onReceive()
method where each message is received as a Intent object parameter.
public class MyReceiver extends BroadcastReceiver {
@Override . public void onReceive(Context context,
Intent intent) {

Toast.makeText(context, "Intent Detected.", Toast. LENGTH_LONG).show();

BROADCAST-RECEIVER
Registering BroadcReteive
An application listens for specific broadcast intents by registering a broadcast receiver

in AndroidManifest.xml file. Consider we are going to register MyReceiver for sys tem generated
event ACTION_BOOT_COMPLETED which is fired by the system once the Android system has
completed the boot process.

Registers for Intents to Observe

ಸಾಕ ದ್ನ

Android Broadcast

System Receiver

அட ணன

Gets Notification when Intents Occur

android: icon="@drawable/ic_launcher"

Similar Question Papers