Checking if location services are enabled using react native
Use the "react native android location services dialog box" module for android
https://www.npmjs.com/package/react-native-android-location-services-dialog-box
install
npm install react-native-android-location-services-dialog-box --save
js
import LocationServicesDialogBox from "react-native-android-location-services-dialog-box";
LocationServicesDialogBox.checkLocationServicesIsEnabled({
message: "Use Location ?",
ok: "YES",
cancel: "NO"
}).then(function(success) {
console.log(success); // success => "enabled"
).catch((error) => {
console.log(error.message); // error.message => "disabled"
});