Introducing React Native Android Location Enabler

Qaraton | Introducing React Native Android Location Enabler

At Reactron, we offer mobile applications on iOS and Android using React Native technology. Our goal is to offer rich mobile experiences without sacrificing quality and React Native has enabled us to bridge any native features to the JavaScript side. There was one feature which was requested by our customer a lot. Specifically, it is to be able to enable the location service in Android devices without requesting users to open the device setting and enable that manually. Fortunately, there is a SettingClient API that does precisely that. However, we couldn’t find a suitable open-source library that offers flexibility and ease of use. We decided to write the bridge ourselves, and today we proudly introduce react-native-android-location-enabler!

Installing the library is very simple. You only need to run the good old npm start command or yarn add command. If you are running React Native 0.60 or above, the linking is already handled automatically for you. The library also has just two APIs: [checkLocationSettingStatus] and [checkAndEnableLocationSetting]

We hope this library, although small, may help others with the same need. Please don’t hesitate to submit issues or pull requests!

Leave a Reply

Your email address will not be published. Required fields are marked *