On Wed, Feb 15, 2012 at 8:50 AM, Anieeh wrote:
> i have a
> service which runs continuously in background when no activity is
> running.
This is not generally a good idea, unless the user specifically
requested it (e.g., music player). Users think developers who create
everlasting services are morons and go to great lengths to attack such
apps with task killers, "force stop" in Settings, etc.
> And this background service uses that model object kept in
> Application class.
>
> Is our application instance will remain in memory when no activity is
> running and our service is running in background?
Until the user or Android terminates your process, yes.
> or application
> object killed and our service will run continuously . so that Service
> will get the model object from Application.
The Application object only goes away when the process does.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
_Android Programming Tutorials_ Version 4.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 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