I have a mix-case IDL service that I'm using in 2 ways:
- The service will spawn a thread and make a network call to grab some XML content on Activity's behalf. The content is return back to the Activity through client's IDL that defines callback methods
- If user chooses notification option then service creates a Timer that gets executed repeatedly and creates a toolbar notification. It also cached the content so when Activity request an update it is served from the cache rather than another network call
So my questions are
- For scenario #1 what is the price (if any) I'm paying for using service for network calls instead of creating background thread directly in the Activity?
- For #2 - am I better off changing implementation to AlarmManager? I noticed that when I kill processes with TasKiller my service dies and never gets restarted, would AlarmManager-base job have better chance of recovery?