Google News
logo
Android - Interview Questions
Define intents in Android. What are the different types of intents?
An Intent is an “intention” to do an action.  An intent is a messaging object you can use to request an action from another app component.
 
Methods are used to deliver intents to different components :
 
context.startActivity() : To start an activity
context.startService() : To start a service
context.sendBroadcast() : To deliver a broadcast
 
Types of Intent :
 
Implicit Intent : Implicit intent is when the target component is not defined in the intent and the android system has to evaluate the registered components based on the intent data.
 
Explicit Intent : Explicit intent is when an application defines the target component directly in the intent.
Advertisement