[android-developers] Re: What are your thoughts on this service - activity communication pattern?

2011-06-26 Thread Zsombor
Thanks, it seems that I'm overthinking the problem a bit, I'll just skip the postbox stuff. On Jun 25, 9:52 pm, Kostya Vasilyev wrote: > If the service process is killed, it won't have its onDestroy called, > and won't have a chance to update shared preferences indicating it's not > running. > >

Re: [android-developers] Re: What are your thoughts on this service - activity communication pattern?

2011-06-25 Thread Kostya Vasilyev
If the service process is killed, it won't have its onDestroy called, and won't have a chance to update shared preferences indicating it's not running. -- Kostya 25.06.2011 23:06, m.andrew пишет: But with this design I can't handle cases where the job finishes, but the Acitivity is not resume

[android-developers] Re: What are your thoughts on this service - activity communication pattern?

2011-06-25 Thread m.andrew
> But with this design I > can't handle cases where the job finishes, but the Acitivity is not > resumed You could control the state of your service using SharedPreferences. Call getSharedPreferences() in onDestroy() method of your service and save the state. Do the same thing in resumed/restored