Thanks for your clarification. I will explain you little more details.
I have started a launched MainActivity and started a SubActivity for Result. In subactivity i am scanning barcode of items from barcode app and adding items in collection. I have to return the scanned items after clicking done button in subactivity. I am creating a Message object and returning message.sendToTarget() is it the right way I am doing? thanks Chenna On Mon, Oct 3, 2011 at 5:59 PM, Mark Murphy <[email protected]> wrote: > On Mon, Oct 3, 2011 at 7:41 AM, Chenna <[email protected]> wrote: > > I have started a activity B from a Activity A by calling > > startActivityForResult(A,B) > > > > The activity B is collecting objects in every 1 min and adding into a > > List. I have a DONE button on my activity A. I want to get result > > whenever DONE button clicked. > > Since Activity B is on the screen, the user cannot click a button in > Activity A. If the button were in Activity B, you could call > setResult() and finish() to return control to Activity A with a result > value. > > The point behind startActivityForResult() is for you to display an > activity, the user to make a choice, and for that choice to be > returned to the initial activity. It is not designed for "collecting > objects every 1 min and adding into a List". > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > Android 3.1 Programming Books: http://commonsware.com/books > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- *Thanks* *Chenna* -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

