0

How can we turn on/off GPS programatically without going on setting screen in android?

shripal
  • 21
  • 2
  • 4

2 Answers2

1

You cannot do this.

This is important for privacy reasons.

How to programmatically enable GPS in Android Cupcake

Community
  • 1
  • 1
Umesh
  • 4,406
  • 2
  • 25
  • 37
1

// Remove the listener you previously added

locationManager.removeUpdates(locationListener);

got from http://developer.android.com/guide/topics/location/obtaining-user-location.html

Arun Chettoor
  • 1,021
  • 1
  • 12
  • 17