Reputation: 21
How can we turn on/off GPS programatically without going on setting screen in android?
Upvotes: 0
Views: 3824
Reputation: 1141
// Remove the listener you previously added
locationManager.removeUpdates(locationListener);
got from http://developer.android.com/guide/topics/location/obtaining-user-location.html
Upvotes: 1
Reputation: 4256
You cannot do this.
This is important for privacy reasons.
How to programmatically enable GPS in Android Cupcake
Upvotes: 1