startActivityForResult is essential for an application?

Put your problem here if it does not fit any of the other categories.

startActivityForResult is essential for an application?

Postby vitorpfn » Thu Apr 14, 2011 5:11 pm

Hello, i had see many examples which use startActivity and startActivityForResult.

With the startActivity method i can make all things in compare to startActivityForResult?

i dont understand the situations i have to use one of them. can anybody explain me this better? thanks
vitorpfn
Developer
Developer
 
Posts: 43
Joined: Tue Mar 29, 2011 1:10 pm
Location: Portugal

Top

Re: startActivityForResult is essential for an application?

Postby AedonEtLIRA » Mon Apr 18, 2011 11:12 pm

StartActivityForResult is subtly different from startActivity. The former is used if you want to return something(s) easily. For example, lets say you have a list activity full of twenty options that are tied into a database. If you use StartActivityForResult you can open the list activity and select the item and return it simply. This can tie into other things such as linking your program to the contacts activity, which will allow you to select a contact from the list on the system. If you used startActivity you would not be able to get the contact that was clicked. StartActivity is mainly used for just that starting an activity that will run longer than just a quick selection.
Walk with purpose, and build something.
User avatar
AedonEtLIRA
Senior Developer
Senior Developer
 
Posts: 146
Joined: Wed Jul 28, 2010 11:52 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 20 guests