I haven't been able to figure this out on my own yet, so here's the code I'm
using:

To start an activity (happens in onCreate with a specific condition):
Intent i = new Intent(StatusActivity.this, AddAccountActivity.class);
this.startActivity(i);

To close the new activity (happens in a callback method after doing OAuth
with Twitter/Facebook):
finish();

I'm not attempting to return data to the initial activity, but Is there
something I need to do in the initial activity that can catch the return?
 Or what am I missing here?

Chris Stewart
[email protected]


On Thu, Jul 22, 2010 at 3:49 PM, Chris Stewart <[email protected]>wrote:

> I do have one of those circumstances.  I'll investigate further and see if
> I can discovery why calling finish is not doing what I expect (i.e., I'm
> doing it wrong).
>
> Chris Stewart
> [email protected]
>
>
> On Thu, Jul 22, 2010 at 3:08 PM, Joseph Earl <[email protected]>wrote:
>
>> As TreKing said - it is perfectly fine and normal for an activity to
>> finish() itself in circumstances where that is required.
>>
>> On Jul 22, 7:56 pm, TreKing <[email protected]> wrote:
>> > On Thu, Jul 22, 2010 at 1:35 PM, RichardC <
>> [email protected]>wrote:
>> >
>> > > There is usually no need to call finish().
>> >
>> > > If you have avoided doing anything "clever", when the user presses
>> > > the [back] button your top activity will finish and the one underneath
>> will
>> > > resume.
>> >
>> > Well, if your second activity is there to provide the first with a
>> result,
>> > there is certainly the need to call finish(). This is pretty common
>> > functionality and not what I would call being "clever".
>> >
>> >
>> -------------------------------------------------------------------------------------------------
>> > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
>> > transit tracking app for Android-powered devices
>>
>> --
>> 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]<android-developers%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

-- 
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

Reply via email to