Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Checking the location settings #3

Open
MohamedHamada12 opened this issue Oct 29, 2017 · 2 comments
Open

Checking the location settings #3

MohamedHamada12 opened this issue Oct 29, 2017 · 2 comments

Comments

@MohamedHamada12
Copy link

How I can check location setting after user give permission ?

@yehiahd
Copy link

yehiahd commented Dec 6, 2017

@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
}

@MohamedHamada12
Copy link
Author

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants