for background tracking driver app is now using 2 different plugin as follow
you might be asking why driver appp is using 2 different plugin,
reason is the current plugin called cordova-plugin-background-geolocation does not work well in iOS specially
when app is backgrounnd
while this new plugin called cordova-background-geolocation-lt works in iOS foreground and background
why not use the latest plugin both for android and ios ?
the new plugin is not free is for commercial use and you need to purchase a license
in order to use the plugin in android , for more details click here.
on debug mode you still can use android but for production mode you need the license key,
and license key can be set in config.xml
why use the new plugin in iOS?
the plugin is free when using for iOS according to author , no
need to purchase license key.
In short the new app will be using old plugin for android and new plugin for iOS to avoid purchasing license key.
What if i want to use new plugin for both android and iOS?
You can do that by just little modification in the code, follow the steps below.
if(cordova.platformId === "android"){
initBackgroundTracking();
} else if(cordova.platformId === "ios"){
initBackgroundLT();
}
to
initBackgroundLT();
this means we will use cordova-background-geolocation-lt both android and iOS
My background tracking still does not work?
there are several issue when app is not working in background,
solutions below.
Android 10
iOS