In my app I want the ability to continually check for Internet, Bluetooth and GPS status (if one is off/on). I need each of these to be on at all times for my application to work effectively. For the Internet, I use a Handler which checks if internet is off/onevery x seconds, and I create Settings.ACTION_SETTINGS intent whichthe user can select to turn internet on.For the Bluetooth I have a Broadcast receiver which tells me if    bluetooth is on/off and I handle it accordingly.For the GPS I use a Handler too.The problem I have is that my MainActivity is a Google Maps Activity and my way of handling bluetooth/internet/gps is not very user friendly, an alert dialog is brought up for each separate one (when off). I'm thinking of having one AlertDialog that controls all of bt/internet/gps. However, I'm not sure if this is even possible (I also need to connect to pair to a bluetooth device).What would you recommend is the best way to do this?
Android continually checking Internet, Bluetooth and GPS status?
android;internet
In my app I want the ability to continually check for Internet, Bluetooth and GPS status (if one is off/on). I need each of these to be on at all times for my application to work effectively.It's apps like yours that continually run down my battery power...It would be better to test once each time you fire up the app or return to it, and then better handling for when a service is off that you needed (like trying to make an internet request). Continually checking for services when you don't actually need them does nothing but eat CPU cycles and power.As for the dialog - wrap all three service checks into a single function that informs the user the status of all three services in one dialog when any of them are off.