How to add geolocation to your Android app using React Native

TL;DR: Use the rn-geolocation npm package. After you install it, install Google Repository and Google Play Services dependency. Add the plugin to your Android build by changing your settings.gradle and android/app/build.gradle and add the package to your

For the past few days I have been developping a React Native app for Android. One of the things I needed for my app was geolocation. I started by trying navigator.geolocation just to figure out that the Geo Location module is a Missing Module in React Native for Android. Since that was not an option, I set out looking for answers:

The ones I found depended on external libraries, so in the end I ended up creating my own rn-geolocation native module for Android. I have to thank Corentin Smith for sharing his Java code with me. I ended up using most of it for my package.

To use the package check the github or npm page, as they have the most up to date information.

Originally published at on November 11, 2015.

Dev at Sketchfab