fbpx

Introducing React Native Android Location Enabler

React Native Android Location Enabler Blog's banner

At Reactron, we offer mobile applications on iOS and Android using the 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 which does precisely that. However, we couldn’t find a suitable open-source library which 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!

Other blogs

React Native End-to-End testing with Detox and GitlabCI...

Tests to a software development team are like legs to a whole body that bear the weight of technical complexities in the pursuit of...
Continue reading

How React Native has changed the face of cross-platform...

React Native uses Javascript, which is the most widely adopted language in the world at the current time of writing. That eases the...
Continue reading