title: Repeating IntentService using Timers- is it advisable?
body: <p>I have an <code>IntentService</code> that downloads data from a server and I would like the <code>IntentService</code> to check for server updates at a certain interval. The following posts however advice against repeating a <code>Service</code> using a <code>Timer</code> - and instead emphasize on using an <code>AlarmManager</code>:</p>
  <p><a href="https://stackoverflow.com/questions/2265020/why-doesnt-my-service-work-in-android-i-just-want-to-log-something-ever-5-sec?rq=1">Why doesn&#39;t my Service work in Android? (I just want to log something ever 5 seconds)</a></p>
  <p><a href="https://stackoverflow.com/questions/23815685/android-service-repeats-only-once">Android - Service: Repeats only once</a></p>
  <p><a href="https://stackoverflow.com/questions/4925965/android-service-stops">Android service stops</a></p>
  <p>From Android's reference manual, an IntentService is described as:</p>
  <blockquote>
  <p>IntentService is a base class for Services that handle asynchronous requests (expressed as Intents) on demand. Clients send requests through startService(Intent) calls; the service is started as needed, handles each Intent in turn using a worker thread, and stops itself when it runs out of work.</p>
  <p>This &quot;work queue processor&quot; pattern is commonly used to offload tasks from an application's main thread. The IntentService class exists to simplify this pattern and take care of the mechanics. To use it, extend IntentService and implement onHandleIntent(Intent). IntentService will receive the Intents, launch a worker thread, and stop the service as appropriate.</p>
  <p>All requests are handled on a single worker thread -- they may take as long as necessary (and will not block the application's main loop), but only one request will be processed at a time.</p>
  </blockquote>
  <p>The part I don't really understand is why an <code>IntentService</code> (the posts have questions that are directed towards a <code>Service</code> and not an <code>IntentService</code>) is not allowed to execute repetitively using a Timer as it creates its own worker thread for execution. Is it permissible to use a <code>Timer</code> within an <code>IntentService</code> ? Or are <code>AlarmManagers</code> the only solution to periodically execute an <code>IntentService</code> ?</p>
  <p>An explanation to this would be most appreciated .</p>