Back to Blog

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 blog

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

Testing and Mobile Application development process

Tests to a software development team are like legs to a whole body that bear the weight of technical complexities in the pursuit of good-quality products. Without tests, the fast cycle of iterations and the market’s requirement of quick releases often seen in modern software development will easily overwhelm the business itself.  Disclaimer: The brands, […]

Continue reading

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

React Native uses Javascript, which is the most widely adopted language in the world at the current time of writing. That eases the mass-adoption of the technology. The way React Native is created paves the way to achieving the best performance possible from a mobile application while allowing community contributions to make React Native even better.

Continue reading