producted
producted

Reputation: 113

Android background service

I'm developing an Android application that has a list of items. What options do I have to make a background service to update that list from a webservice from time to time, asking first for the user permission? Can you provide code samples?

Thanks in advance!

Upvotes: 0

Views: 668

Answers (1)

Pentium10
Pentium10

Reputation: 208022

  • Implement a user interface where you will have settings for update interval
  • implement an alarm, so that is fired as the user set it
  • make your alarm start your service, your service starts a thread, and updates the content, saves to database

you can search the stackoverflow site for example how to use alarms, broadcasts, services and threads

Upvotes: 2

Related Questions