You can check whether gps is off or on using LocationManager:
http://stackoverflow.com/questions/4300572/android-gps-on-or-off-state