Thanks mark for your quick reply "Terminate the process" you mean user "force stop" the application or by memory crunch when android kills the service and application both.
Actually my service is running continuously for syncing location to server at particular interval, Is there any better way to do this without using or running continuously in background. Thanks Anieeh On Feb 15, 6:54 pm, Mark Murphy <mmur...@commonsware.com> wrote: > On Wed, Feb 15, 2012 at 8:50 AM, Anieeh <animesh.andr...@gmail.com> 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/commonsguyhttp://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