Android Auto-linking Installation
January 15, 2026 · View on GitHub
With yarn
yarn add react-native-background-geolocation
With npm
npm install react-native-background-geolocation --save
Gradle Configuration
Add the following ext variables to control the version of Google dependency versions the plugin will align to.
:information_source: You should always strive to use the latest available Google Play Services libraries. You can determine the latest available version here.
:open_file_folder: android/build.gradle
buildscript {
ext {
+ playServicesLocationVersion = "21.3.0" // Or higher.
}
}
### :open_file_folder: **`android/app/build.gradle`**
```diff
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
android {
.
.
.
buildTypes {
release {
.
.
.
minifyEnabled enableProguardInReleaseBuilds
+ shrinkResources false
}
}
}
AndroidManifest.xml (License Configuration)
Note
If you've not purchased a license, ignore this step — the plugin is fully functional in DEBUG builds so you can try before you buy.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.transistorsoft.backgroundgeolocation.react">
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<!-- react-native-background-geolocation licence -->
+ <meta-data android:name="com.transistorsoft.locationmanager.license" android:value="YOUR_LICENCE_KEY_HERE" />
.
.
.
</application>
</manifest>