Friday, 17 June 2011

Explicit Intents Android


Explicit intents are explicitly defines the exact component which should be called by the Android system, by using the Java class as identifier.

The following code shows how to create an explicit intents and send it to the Android system. That means Android system will directly execute your intent request as you requested. Explicit intents are typically used within an application as the classes in an application are controlled by the application developer. If you want to open an Android Activity from another activity, then below is the code using intent. Also you can send some data to that activity if required.
Intent i = new Intent(this, ActivityTwo.class);
i.putExtra("First Value", "This First Value for ActivityTwo");
i.putExtra("Second Value", "This Second Value ActivityTwo");

No comments:

Post a Comment

Android SQLite Database Viewer or Debuging with Stetho

Every Android Developer uses SQLite Database to store data into the Android Application data. But to view the data in SQLite have a lot of...