My problem is simple. I need a way to turn on and off GPS using a button inside an Ionic app. I've check the docs and read this ng-cordova plugin http://ngcordova.com/docs/plugins/geolocation/ but they don't seem have this funcction. Am I just missing something or is this even possible in Ionic Framework? Thanks!
As far as I'm aware there isn't the ability to directly disable GPS from your app.
If you are trying to allow the user to disable GPS, I achieved this by adding a setting to localStorage
that the user can change on the settings page in my app. Every time I check for GPS in my location factory, I check against the setting and run the error callback if the setting was disabled.
There may be some sort of call which can automatically open the location settings page on your device as I have seen other apps do this, but I'm not sure if that is supported in Cordova/Ionic yet.