-2

I would like to perform the following tasks on every 30 minutes interval -

  • MNC, MCC, LAC & Cell ID
  • Display it to user &
  • Send these information to a remote server via HTTP request.

During this time, the app may/may not be in front.

My question is, is IntentService a good idea to execute the above tasks? Or, any other idea?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
s.k.paul
  • 7,099
  • 28
  • 93
  • 168
  • https://stackoverflow.com/questions/33041573/android-create-a-background-thread-that-runs-periodically-and-does-ui-tasks – Northern Poet Oct 18 '17 at 05:32

1 Answers1

0

I think you are trying to build a sync mechanism. Best approach would be using Sync Adapters which is designed for these situations.

But for using sync adapters, you need to change your login mechanism to work with AbstractAccountAuthenticator if you are not on it.

Good luck

Emre

Emre Aktürk
  • 3,306
  • 2
  • 18
  • 30