Introduction

- android.content.Intent intent =new intent(parameters);

- startActivity(intent);
Types Of Intents
- Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
- startActivity(i);
According to this example when we use this intent then the web browser automatically opens and searches Google. In other words, the current activity transfers the link on the web browser for the search.
The following are all the Basic Actions:
- ACTION_MAIN
- ACTION_VIEW
- ACTION_ATTACH_DATA
- ACTION_EDIT
- ACTION_PICK
- ACTION_CHOOSER
- ACTION_GET_CONTENT
- ACTION_DIAL
- ACTION_CALL
- ACTION_SEND
- ACTION_SENDTO
- ACTION_ANSWER
- ACTION_INSERT
- ACTION_DELETE
- ACTION_RUN
- ACTION_SYNC
- ACTION_PICK_ACTIVITY
- ACTION_SEARCH
- ACTION_WEB_SEARCH
- ACTION_FACTORY_TEST
Ther action will be used depending on their format like:
- ACTION_VIEW -> Uri.parse(http://www.google.com);
- ACTION_DIAL ->Uri.parse(“tel:123456789”);
123456789 is contact Number.
Explicit Intent
- Intent i1 =new Intent(FirstMainActivity.this,SecondMainActivity.class);
- String username="Neeraj";
- String password="Neeraj";
- i1.putExtra("Username", username);
- i1.putExtra("Password", password);
- startActivity(i1);
This example shows two activities, one is “FirstMainActivity” and the other is “SecondMainActivity”.
How to get Values in another Activity from an Intent?
FirstMainActivity.java file code,

Amit VermaPosted Jul 29, 2016, 7:12 AM
useful article
Abhijeet SinghPosted Jul 13, 2016, 1:28 AM
Good one..
kalu singh raoPosted Jul 12, 2016, 1:49 AM
Nice...