Actually Push notifications will not work if he Force Closes the app, since they stop functioning at that point... Will probably work if killed by a Task Killer.
I personally think that if a user is stupid enough to use task killers and kill your app, it shouldn't be running on his phone... but if you wanna cater to these users, the trick is to use the AlarmManager to check if your app is running. If you want that to work on android 2.x (and probably till eternity if you're really diabolical) you can set up another app that is responsible for waking up the first up if it is closed. On Tuesday, April 23, 2013 11:28:14 PM UTC+3, TreKing wrote: > > > On Thu, Apr 18, 2013 at 11:28 AM, Archibald Archi > <[email protected]<javascript:> > > wrote: > >> I'm currently developing an application with a service. My service is >> always listening from a server and waiting for messages or notifications >> and It mustn't be stopped. > > > Use Push Notifications. What you're trying to achieve is ill-advised on > Android and can only be achieved through cheap hacks. > > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/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 [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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

