Android Interview Questions and Answers What is android?



Download 0.77 Mb.
View original pdf
Page26/62
Date17.12.2020
Size0.77 Mb.
#54986
1   ...   22   23   24   25   26   27   28   29   ...   62
Android Interview Questions
72. What is an
Intent
? A class (Intent) which describes what a caller desires to do. The caller will send this intent to Android's intent resolver, which finds the most suitable activity for the intent. E.g. opening a PDF document is an intent, and the Adobe Reader apps will be the perfect activity for that intent (class.
73. What is a Sticky Intent? A. Sticky Intent is also a type of Intent which allows a communication between a function and a service sendStickyBroadcast()
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). One 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.


74. How the nine-patch Image different from a regular bitmap Alternatively, what is the difference

Download 0.77 Mb.

Share with your friends:
1   ...   22   23   24   25   26   27   28   29   ...   62




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

    Main page