Monday, March 19, 2012

Re: [android-developers] How to keep activity running

On Mon, Mar 19, 2012 at 8:39 AM, RedBullet <scottedchapman@gmail.com> wrote:
So, what's the right policy here, should I over-ride the onDestroy and just have it do nothing, but provide a way to manually kill the activity?

That won't prevent the system from killing your app - it's just a signal to you that it's happening. If your activity is in focus, you will not be killed. If you need to keep your process running in the background, you need a Service. If you need to keep it from getting killed and need to interact with the user, you need an ongoing notification along with your Service.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment