Android Basics – What is an Intent and how is it used to call an Activity ?

In Android App you can have multiple Activities. Each Activity performs a certain task. At times it needs to call another Activity.

To do this Intent is used. Which means an intent to do something.

To call a new MessageActivity from the MainActivity – on click of a Button add the following two lines in your MainActivity

Intent intent=new Intent(this, MessageActivity.class);
startActivity(intent);

That’s it !

Author: androidsmartly

I am a Tech Enthusiast who likes to work on new Ideas. Sharing knowledge on Android, Marketing, Startups and More.

1 thought on “Android Basics – What is an Intent and how is it used to call an Activity ?”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s