Services can always be shut down by the OS. As such they seem less reliable to me than an AlarmManager. I have to do periodic updates every 1-2 seconds. Is it better to use background thread in a service or AlarmManager. Since there are ways to use AlarmManager without waking up the app. See http://vikinghammer.com/2012/04/22/android-use-alarmmanager-instead-of-a-service-with-a-timertask/
I wonder what advantage all the Timer, Thread, and Service code have? One thought I had against AlarmManager is that the task code must execute somewhere, so upon receiving it a BroadcastReceiver seems like wrong place to execute code. How about passing off to an IntentService? Is this higher overhead than all the thread management inside a running background service? Without AlarmManager how can we guarantee the background service really stays up and running?
Just to clarify, my app will run in background while other apps are allowed to be run by user. I will stop some of them, but let others run for long time. As such I don't think service checking every 2 seconds, guarantees it will be kept around while users are engaged with other apps. But if alarm manager, I can guarantee checks are always done right?