OUTPUT :
You will not see any output on the emulator or device. You need to open logcat.
Now see on the logcat: onCreate, onStart and onResume methods are invoked.
Now click on the HOME Button. You will see onPause method is invoked.
After a while, you will see onStop method is invoked.
The onCreate() and onDestroy() methods are called only once throughout the activity lifecycle.

When you run the following code, First is ON CREATE , second is ON START and third is ON RESUME.

When you press the home button from the emulator, ON PAUSE and ON STOP methods call.

And when you open the application again ON RESTART, ON START and ON RESUME methods call.

And at last, when you press the back button from emulator, ON PAUSE , ON STOP and ON DESTROY method calls.

1. Android Intent

Android Intent is the message that is passed between components such as

activities,

content providers,

broadcast receivers,

services etc.

It is generally used with startActivity() method to invoke activity, broadcast receivers etc.

The dictionary meaning of intent is intention or purpose. So, it can be described as the intention to do action.

The LabeledIntent is the subclass of android.content.Intent class.

2. Android intents are mainly used to:

Start the service

Launch an activity

Display a web page

Display a list of contacts

Broadcast a message

Dial a phone call etc.

3. Types of Android Intents

There are two types of intents in android:

Implicit Intent

Explicit Intent

3.1 Implicit Intent

Implicit Intent doesn't specifiy the component. In such case, intent provides information of available components provided by the system that is to be invoked.