[android-developers] Re: Activity lifecycle and static variables ....

2009-07-14 Thread Richard Schilling
Yes. I had read that, and I understand that the VM tries to stratify processes depending on their function and keep my process alive as long as possible. What I'm really interested in is detecting when the the VM (re)-instantiated and garbage collects my Activity class, and how that relates to t

[android-developers] Re: Activity lifecycle and static variables ....

2009-07-14 Thread Dianne Hackborn
Yeah, the process lifetime, which is outlined here: http://developer.android.com/guide/topics/fundamentals.html#proclife On Tue, Jul 14, 2009 at 1:38 PM, Richard Schilling < richard.rootwirel...@gmail.com> wrote: > > Thanks Dianne. Very helpful indeed. > > For process lifetime, I don't think yo

[android-developers] Re: Activity lifecycle and static variables ....

2009-07-14 Thread Richard Schilling
Thanks Dianne. Very helpful indeed. For process lifetime, I don't think you're referring to the "entire lifetime" of an Activity as defined on the API reference page for Activity (http://developer.android.com/reference/android/app/ Activity.html): "The entire lifetime of an activity happens bet

[android-developers] Re: Activity lifecycle and static variables ....

2009-07-14 Thread Dianne Hackborn
Statics are statics -- they are global to the process. So their value will last for the lifetime of the process, which is usually much longer than an individual activity instance. On Tue, Jul 14, 2009 at 12:52 PM, Richard Schilling < richard.rootwirel...@gmail.com> wrote: > > I just ran into a s

[android-developers] Re: Activity Lifecycle

2009-07-03 Thread hmmm
What if you make your activity singleTop and then use onNewIntent() in the same activity such as onCreate { configure(); } onNewIntent { configure() } -Original Message- From: Daniel To: Android Developers Date: Fri, 3 Jul 2009 00:38:44 -0700 (PDT) Subject: [android-developers] Activ

[android-developers] Re: Activity Lifecycle in Regards to Process Lifecycle and GC

2009-01-13 Thread iliketolearn
Thanks Dianne, as usual your responses are prompt and helpful. --~--~-~--~~~---~--~~ 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 uns

[android-developers] Re: Activity Lifecycle in Regards to Process Lifecycle and GC

2009-01-13 Thread Dianne Hackborn
On Tue, Jan 13, 2009 at 12:27 PM, iliketolearn wrote: > When the system is running low on memory, can it selectively choose to > destroy an activity in the process, instead of the entire process? Currently it relies on killing the entire process, but this could change in the future. > For > e

[android-developers] Re: Activity Lifecycle

2008-10-03 Thread Guillaume Perrot
hackbod, with the finishOnTaskLaunch flag set to true, pressing HOME will finish the activity, calling onDestroy. On Oct 3, 2:59 am, hackbod <[EMAIL PROTECTED]> wrote: > Um...  you should fix your program. :) > > You can't really rely on onDestroy() for this.  For example, if the > user presses h

[android-developers] Re: Activity Lifecycle

2008-10-02 Thread hackbod
Um... you should fix your program. :) You can't really rely on onDestroy() for this. For example, if the user presses home to get out of your app, the activity will not be destroyed. And if the user flips the lid while your activity is running, the current instance will be destroyed and a new

[android-developers] Re: Activity Lifecycle

2008-10-02 Thread Guillaume Perrot
What's that resource you're talking about ? On Oct 2, 11:20 am, elvisw <[EMAIL PROTECTED]> wrote: > to release some resource violently... > that resource has no API for me to release it smoothly.. > it will keep working, cost cpu time unless i exit the process... > so... > > Thanks > > On Oct

[android-developers] Re: Activity Lifecycle

2008-10-02 Thread elvisw
to release some resource violently... that resource has no API for me to release it smoothly.. it will keep working, cost cpu time unless i exit the process... so... Thanks On Oct 2, 3:35 pm, hackbod <[EMAIL PROTECTED]> wrote: > You can use the Process class to kill yourself.  But doing t

[android-developers] Re: Activity Lifecycle

2008-10-02 Thread hackbod
You can use the Process class to kill yourself. But doing that pretty nasty, and almost certainly won't work all that well. Why would you want to do such a thing? On Oct 1, 8:37 pm, elvisw <[EMAIL PROTECTED]> wrote: > Hi everyone, > >     Normally, when onDestroy() been called, the process is s

[android-developers] Re: Activity Lifecycle Question

2008-09-29 Thread Guillaume Perrot
"A situation you will often run in to is when another entity (such as the SearchManager or NotificationManager) starts one of your activities. In this case, the Intent.FLAG_ACTIVITY_NEW_TASK flag must be used, because the activity is being started outside of a task (and the application/task may no

[android-developers] Re: Activity Lifecycle Question

2008-09-28 Thread Gil
Awesome! You saved the day ... again. --~--~-~--~~~---~--~~ 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,

[android-developers] Re: Activity Lifecycle Question

2008-09-28 Thread Megha Joshi
When setting the Notification intent, are you using the Flags CLEAR_TOP and SINGLE_TASK? ie. Intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK) More explanation about these launch modes is given in the docs below: http://code.google.com/android/reference/android/conten

<    1   2