react-native-android-location-enabler
react-native-android-location-enabler copied to clipboard
Check if location is enabled without opening modal
It will be nice to have a function that only checks if the location is turned on instead of asking to turn it on.
Useful in case for localize icons
such as Google Maps.
if GPS is off, localize the show question mark icon.
You can use this package for that: https://github.com/react-native-community/react-native-permissions
Permissions.check('location' ).then(response => {
// response is: 'authorized', 'denied', 'restricted', or 'undetermined'
});
https://github.com/react-native-community/react-native-permissions#permissions-statuses
Ok, why not. I'll add the function as soon as possible.
@gianpaj from what I understand it is not a good solution. As the user can give location permission but the gps can still be turned off..we need to check if the gps is on..is there a method to do that?
Hi. @Richou Is there any update for this issue?
Hi, any update for this issue?