Intent in android

In Android, It support a class very helpfull when application need tranfer data between some activity in application. It very easy to use, and we have a few note when use it.
Intent have tow method to start it.

  • startActivity(intnet)
  • startActivityForResult(intnet, REQUEST_CODE)

For startActivity(intent), we use when activity started that don’t need get result that other Acvity return.
For startActivityForResult(intnet, REQUEST_CODE), we use it when we care result that other Acvity return.

REQUEST_CODE this’s a variable that attached when use startActivityForResult to show that result from sub-activity that started return is !, and Activity called it.

This’s Code for Intent :
Download Source Here


Advertisements

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