Open diegoarbelaez opened 1 year ago
Sounds like you are missing a string in the app strings table. Here's how I use this plugin: https://github.com/IsraelHikingMap/Site/blob/f5480f43e0f03c104b1fbbffbdcbfe5fa0e74c68/IsraelHiking.Web/src/application/services/geo-location.service.ts
Thanks @HarelM for your reply,
However I'm still confused, where are the app strings table?
Thanks!
In the android configuration files, look in the android folder.
Add these variables inside android/app/src/main/res/values/strings.xml:
<string name="plugin_bgloc_account_name">$ACCOUNT_NAME</string>
<string name="plugin_bgloc_account_type">$ACCOUNT_TYPE</string>
<string name="plugin_bgloc_content_authority">$CONTENT_AUTHORITY</string>
Compilation for Android is failing "error: resource string/plugin_bgloc_content_authority not found"
I use capacitor 4, and followed the instructions as:
import { Injectable } from '@angular/core'; import { BackgroundGeolocationPlugin, Location, } from 'cordova-background-geolocation-plugin'; declare let BackgroundGeolocation: BackgroundGeolocationPlugin;
@Injectable({ providedIn: 'root', }) export class BackgroundService {
constructor() {}
startBackgroundGeolocation() { BackgroundGeolocation.configure({ locationProvider: BackgroundGeolocation.ACTIVITY_PROVIDER, desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY, stationaryRadius: 50, distanceFilter: 50, notificationTitle: 'Background tracking', notificationText: 'enabled', debug: true, interval: 10000, fastestInterval: 5000, activitiesInterval: 10000, url: 'http://https://csi.mipgenlinea.com/test/recibirBackground.php', httpHeaders: { 'X-FOO': 'bar', }, // customize post properties postTemplate: { lat: '@latitude', lon: '@longitude', foo: 'bar', // you can also add your own properties },
} }
Please any help or ideas?
I really appreciate