giovedì 14 aprile 2011

Android Activity startActivityForResult

I think we are all familiar with intents and startActivity() method. At least, you are, if you have done something with android. But we often do not consider the method startActivityForResult. Just to have an introduction this is what you can find about startActivity on the online documentation:

The startActivity(Intent) method is used to start a new activity, which will be placed at the top of the activity stack. It takes a single argument, an Intent, which describes the activity to be executed.

Very often you need to know what was the result of an activity. Suppose you have a list of item and you can edit them in another activity, you may need to know the result of the edit. Was the item changed? or was the edit canceled? To do that we can use startActivityForResultActivity


Nessun commento: