On Wed, Aug 18, 2010 at 12:01 AM, perumal316 <[email protected]> wrote:
> But I
> don't want Android to close up under-used activities itself.

That is not for you to decide.

> Must i specify it as a service?

Yes, but even then, it will not run forever. Android will still shut
it down. Users do not want it running forever -- that is why
developers are plagued by "task killer" apps.

http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/
http://www.androidguys.com/2010/03/29/code-pollution-background-control/

If you use startForeground(), you can maximize the likelihood that it
will remain in memory, but please be certain that this is a good idea
in the first place.

-- 
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 3.1 Available!

-- 
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

Reply via email to