What is Intent?

454 views.

need deep explaination on Intent

Add Comment
3 Answer(s)
249 views.

An intent is an abstract description of an operation to be performed. It can be used with startActivity to launch an Activity, broadcast Intent to send it to any interested Broadcast Receiver components, and start Service(Intent) or bind Service(Intent, Service Connection, int) to communicate with a background Service

Add Comment
249 views.

Intents are asynchronous messages which allow application components to request functionality from other Android components. Intents allow you to interact with components from the same applications as well as with components contributed by other applications. 

 

Add Comment
249 views.

The meaning of intent is intention or purpose… so, it can be described as intention to do action,   it is the subclass of  android.content.Intent class.

Intents mainly used to :

launch an activity, start a service, display list of contacts etc.., two types of intents available: Implicit intent and  explicit intent 

Implicit intent doesn’t specify the component, example

Intent intent=new Intent(Intent.ACTION_VIEW);  

intent.setData(Uri.parse(“http://www.google.com”));  

startActivity(intent);  

for this, we should take internet  permission in manifest file…

Explicit Example:

Intent i = new Intent(getApplicationContext(), ActivityTwo.class);  

startActivity(i);  

here, we specify ActivityTwo class in manifest file..

Above examples are very basics in intents ..

we can send data from one activity to another activity by using bundle….

 

 

 

 

 

 

Answered on June 25, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.