logic to check if gps is active or not (cordova-app)