-1

I want to sync database from Server to Android (One way) in background on BOOT_COMPLETED.

  • My service is of long duration
  • I want to get JSON from server
  • Access local sqlite db.
  • download image from url i got from JSON

Should I use Service or Service with Thread or IntentService?

Hybrid Developer
  • 2,320
  • 1
  • 34
  • 55
Sushin PS
  • 93
  • 1
  • 11

1 Answers1

0

Service. An IntentService is meant for when you're sending down multiple requests that you want to be handled by the service, which is meant to run to completion then exit. Here we want to start up once and then run. That's a better fit for Service.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127