RxGps icon indicating copy to clipboard operation
RxGps copied to clipboard

Checking the location settings

Open MohamedHamada12 opened this issue 8 years ago • 2 comments

How I can check location setting after user give permission ?

MohamedHamada12 avatar Oct 29 '17 17:10 MohamedHamada12

@MohamedHamada12 You can simply do this by the following two lines : LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { // GPS settings enabled } else { // GPS settings not enabled }

yehiahd avatar Dec 06 '17 13:12 yehiahd

@yehiahd Yes I know we can check using this way , but it should provided by library because Lib considered location setting enabled and try get location.

MohamedHamada12 avatar Dec 06 '17 13:12 MohamedHamada12