Maybe a documentation bug, but this is just how Android is designed:
most developers know this (or quickly learn it when their app crashes
after they turn their screen :-).

Kris


On Thu, Aug 1, 2013 at 2:52 PM, Shri <[email protected]> wrote:
> Using setIntent() is dangerous in the face of activity recreations (which
> can be more easily triggerred with "Developer settings | Don't keep
> activities"). Normally getIntent() returns the intent set by setIntent().
> However, this gets reset after the activity is recreated. This is in line
> with the trivial implementation of setIntent() in
> https://github.com/android/platform_frameworks_base/blob/master/core/java/android/app/Activity.java
>
>     public void setIntent(Intent newIntent) {
>         mIntent = newIntent;
>     }
>
> This seems like a "bug" in setIntent in the sense that it misleads people
> into thinking that it can be used to cache state without realizing the
> activity recreate problem. Am I missing anything?
>
> Thanks,
> Shri
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to