Not really, you misunderstand the Activity Life-cycle. When Activity B is 
showing Activity A can be killed by the OS (at any time) so you need to 
deal with it being re-created.

Setting The Developer option  *Developer Options -> Don't keep activities* ON 
just makes this use-case easier to test.

Read the documentaion for Activity.OnCreate carefully:
http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)
 

If Bundle is null you are being created for the 1st time.  If Bundle is NOT 
null you are being re-created.

On Tuesday, September 18, 2012 8:04:57 AM UTC+1, Put_tiMe wrote:
>
> Aaargh, it was this option that was doing this: *Developer Options -> 
> Don't keep activities.*
>
> Switched it off, and it's all fine now.
>
>
> On Tuesday, September 18, 2012 10:52:12 AM UTC+5:30, Put_tiMe wrote:
>>
>> Nexus 7 - Jelly Bean
>>
>> I have an activity A.
>>
>> The usual callbacks are called: onCreate, onResume, etc.
>>
>> Now I launch B, from A.
>>
>> Again the  usual callbacks are called, this time for "B": onCreate, 
>> onResume, etc. 
>>
>> I close "B". Now "A"'s onResume should get called.
>> But onCreate is getting called.
>>
>>
>> This issue is only on the Nexus 7 tablet, and not on Motorola XOOM, 
>> running Jelly Bean.
>>
>> How do I fix this?
>>
>>

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