Define sticky intent in Android?
Submitted by: AdministratorsendStickyBroadcast() performs a sendBroadcast(Intent) known as sticky, i.e. the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver(BroadcastReceiver, IntentFilter). In all other ways, this behaves the same as sendBroadcast(Intent).
Example of a sticky broadcast sent via the operating system is ACTION_BATTERY_CHANGED. When you call registerReceiver() for that action even with a null BroadcastReceiver you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.
Submitted by:
Example of a sticky broadcast sent via the operating system is ACTION_BATTERY_CHANGED. When you call registerReceiver() for that action even with a null BroadcastReceiver you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.
Submitted by:
Read Online Android Job Interview Questions And Answers
Top Android Questions
☺ | What is APK format in Android? How to make an APK file? |
☺ | What is needed to make a multiple choice list with a custom view for each row? |
☺ | Explain Briefly the Android Application Architecture? |
☺ | What are the dialog boxes that are supported in android? Explain? |
☺ | What are the different Storage Methods in android? |
Top Mobile Technologies Categories
☺ | Android Interview Questions. |
☺ | Wireless Communication Interview Questions. |
☺ | 3G Interview Questions. |
☺ | iPhone Interview Questions. |
☺ | Mobile App Architect Interview Questions. |