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 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 one created. > > Honestly, this isn't a good thing to do. > > On Oct 2, 2: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 2, 3:35 pm, hackbod <[EMAIL PROTECTED]> wrote: > > > > 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 still there > > > > and waiting the system to kill it. > > > > > Is it possible to kill the process in onDestroy() when every time > > > > it is called?? > > > > Is there API to exit the process by the activity itself?? > > > > > Best Regards, > > > > Elvis. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

