0

I want to check location service is open or not when the app starts. I use this code :

LocationManager lm = (LocationManager) getSystemService(LOCATION_SERVICE); if(!lm.isProviderEnabled(LocationManager.GPS_PROVIDER))

However this code check GPS open or not. In my program, i don't need GPS. I just need location access permission. How can i do that?

Thanks for help.

eren
  • 59
  • 1
  • 8
  • Please check This Like Helpfule for u http://stackoverflow.com/questions/10311834/how-to-check-if-location-services-are-enabled – Naveen Tamrakar Aug 29 '14 at 06:43

1 Answers1

0

If you are referring on using either Wifi/Data on accessing location:

LocationManager.NETWORK_PROVIDER