Task killers just do a process kill, so you *don't* get an `onDestroy()`, your app just disappears...
Kris On Wed, Apr 24, 2013 at 3:06 PM, AndreiP <[email protected]> wrote: > When you are getting killed do you get to go through onDestroy()? If so you > can check if it's a graceful exit through your menu choices or killed by a > system. If killed by a system schedule then schedule a restart via > AlarmManager after whatever time period you choose. I didn't check that, > just my line of thinking. If onDestroy doesn't get triggered have alarm (via > AlarmManager) just pop at certain intervals checking if you are alive, > implement WatchDog service basically. > > On Thursday, April 18, 2013 9:28:20 AM UTC-7, Archibald Archi wrote: >> >> Hi! >> >> 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. >> I've solved this issue when the application is killed by the OS Task >> Manager. However, I can't figure out how to prevent this when a Task Killing >> app kills my app. >> I need something like Whatsapp or Line. It's always running since you turn >> on your phone, and if it's killed by OS Task Manager or an especific app for >> this purpose, it restarts after a few seconds. >> >> I really need help on this since I've been reading a lot and searching all >> over the Internet. >> >> Thanks in advance! >> >> Archi > > -- > -- > 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. > > -- -- 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.

