Reputation: 36098
I need to call a JSON web service over the web to download and update the device database. It doesn't need to be real time like push notifications, so 1 or 2 days is fine to update the device.
Is there a way activate my code only when the device is charging and on reboot? I figure this would cover my cases for users charging a dead phone. Maybe I need to add another case for when internet is available also?
I am thinking I need a BroadcastReciver
or a Service
, but I am not sure which one. Do I need to even use AlarmManager
since this is not on a schedule?
Upvotes: 0
Views: 137
Reputation: 172
You can use a different approach.
Upvotes: 1