Basics about the Intents
Intents
are asynchronous messages which allow Android application components to request functions from other components of same or other applications in android system.
An Activity can use Intent Messaging to send the start-up data to another activity.
The loosely coupled application components connect together using Intents.
Intents
are instances of the android.content.Intent
class.
There are two type of intents in android
1.2. Explicit Intents
Explicit Intents specify the name of the component need to call by its java class identifier.
Example :
Intent I = new Intent(this,NextActivity.class);
startActivity(I);
Explicit Intents will used with in the applications.
1.3. Implicit Intents
Implicit Intents specify the action to perform and the URI which is used by action
Example :
Intent I = new Intent(Intent.ACTION_VIEW,Uri.parse("http://creativeandroidapps.blogspot.in");
Intents
are send to the Android system to searches for all components which are registered for the specific action and the data type. If only one component found then system start that component otherwise a dialog is prompted for user selection.
No comments:
Post a Comment