My app uses a BroadcastReceiver and a service to perform background updates. I have created a setting the user can toggle to enable/disable background updates, which basically starts/cancels an AlarmManager that contains an Intent for my BroadcastReceiver.
I also have a receiver setting in the AndroidManifest which uses the BOOT_COMPLETED Broadcast Action. I've noticed if I reboot my device, even if I disabled background updates, the background updates start up again.
My question is, I'm assuming I need to check somewhere, on boot, whether the background update setting has been checked or not. Would I do this in the BroacastReceiver or in the Service itself or is there another way to prevent the background updates from starting on boot.
Thanks.