On Sun, Feb 10, 2013 at 10:26 AM, dashman <erjdri...@gmail.com> wrote:
> When an activity is asleep, it could be destroyed by the os.

There is no concept of "asleep".

> if destroyed, onDestroyed() will be called.

Not necessarily. The process can be terminated without onDestroy() being called.

> if not destroyed, it'll be resumed.

Not necessarily. The process can be terminated without onDestroy() being called.

> I have an Activity as well as an Application sub-class - i store
> some values there.
>
> I put the app to sleep and when i wake up

Apps are not asleep, so I do not know what you mean here.

> - the variables in the
> Activity are initialized to new whereas the values in the Application
> object are still there.
>
> So looks like on wakeup - a new instance of Activity was created
> but the old Application object was used.
>
> Make sense?

Off the cuff, no, but, then again, I do not know what "I put the app
to sleep and when i wake up" means.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 4.5 Available!

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to