$ npm install capacitor-background-geolocation-firebase --save
$ npx cap sync
$ yarn add capacitor-background-geolocation-firebase
$ npx cap sync
allprojects {
repositories {
google()
mavenCentral()
// capacitor-background-geolocation
maven { url("${project(':transistorsoft-capacitor-background-geolocation').projectDir}/libs") }
maven { url 'https://developer.huawei.com/repo/' }
// capacitor-background-fetch
maven { url("${project(':transistorsoft-capacitor-background-fetch').projectDir}/libs") }
+ // capacitor-background-geolocation-firebase
+ maven { url("${project(':transistorsoft-capacitor-background-geolocation-firebase').projectDir}/libs") }
}
}
ext {
.
.
.
+ FirebaseSDKVersion = "33.4.0" // or as-desired
}
Note
the param ext.FirebaseSdkVersion
controls the imported version of the Firebase SDK (com.google.firebase:firebase-bom
). Consult the Firebase Release Notes to determine the latest version of the Firebase SDK
Download your google-services.json
from the Firebase Console. Copy the file to your android/app
folder.
📂 android/app/src/main/AndroidManifest.xml
<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">
<!-- capacitor-background-geolocation-firebase licence -->
+ <meta-data android:name="com.transistorsoft.firebaseproxy.license" android:value="YOUR_LICENCE_KEY_HERE" />
.
.
.
</application>
</manifest>