Android Interview Questions and Answers What is android?


The BroadcastReceiver Class



Download 0.77 Mb.
View original pdf
Page38/62
Date17.12.2020
Size0.77 Mb.
#54986
1   ...   34   35   36   37   38   39   40   41   ...   62
Android Interview Questions
2. The BroadcastReceiver Class
The class android.content.BroadcastReceiver is abstract. To receive broadcast Intents a subclass must be defined which implements the method public abstract void onReceive(Context context, Intent intent) It is this method which is invoked when a broadcast Intent satisfies the criteria the BroadcastReceiver was registered with.
3. Registering Broadcast Receivers Statically
An Application can declare Broadcast Receivers in its manifest (the AndroidManifest.xml file, by defining one or more receiver elements, as children of the application element.



Download 0.77 Mb.

Share with your friends:
1   ...   34   35   36   37   38   39   40   41   ...   62




The database is protected by copyright ©ininet.org 2024
send message

    Main page