0

I want to implement an Android Service that periodically downloads data and notifies various listener activities that the data has been updated.

There seems to be various way of communicating with a Service. What's the simplest and best way to do the above? A code example or a tutorial will be greatly appreciated.

hpique
  • 119,096
  • 131
  • 338
  • 476
  • Here is a previous [answer](http://stackoverflow.com/questions/3197335/android-restful-api-service/3197456#3197456) to this question. – Robby Pond Nov 24 '10 at 17:57

1 Answers1

2

Have a look at the EarthquakeViewer samples from http://www.wrox.com/WileyCDA/WroxTitle/Professional-Android-2-Application-Development.productCd-0470565527,descCd-DOWNLOAD.html.

It shows how to use an AlarmManager in the Chapter 9 samples.

techi.services
  • 8,473
  • 4
  • 39
  • 42
  • +1 Using a BroadcastReceiver seems to be the easiest way. If no one post a code example I might give it a go next week. – hpique Nov 24 '10 at 22:09
  • All the best. All those example projects are well worth looking at. If you buy his book it makes it all much clearer as well... and no I don't get kick backs lol. – techi.services Nov 24 '10 at 22:19