Guys I am making an app which has tracking ability , anyway I am using this plugin :
I used this code to get the location :
const config: BackgroundGeolocationConfig = {
desiredAccuracy: 50,
stationaryRadius: 1,
distanceFilter: 1,
debug: true, // enable this hear sounds for background-geolocation life-cycle.
stopOnTerminate: false, // enable this to clear background location settings when the app terminates
};
this.backgroundGeolocation.configure(config)
.then((location: BackgroundGeolocationResponse) => {
console.log("Here you should see the location");
console.log(location);
console.log(location.longitude);
console.log("Here you should see the End location");
});
// start recording location
this.backgroundGeolocation.start();
so the problem is that when I tried to run it on an android device I got this output
[INFO:CONSOLE(762)] "Here you should see the location"
[INFO:CONSOLE(763)] "OK"
[INFO:CONSOLE(764)] "undefined"
[INFO:CONSOLE(765)] "Here you should see the End location"
how can I get the location ?! , from what I understood location.longitude should show the longitude but it is not , and location is a BackgroundGeolocationResponse but it is not it is showing “ok” , please guys help me I am stuck for two days now on the same issue.
I had a nightmare with this plugin since upgrading to Ionic 4. Ultimately I just used the latest version of the plugin (3.0.3) and used the Cordova plugin directly and it worked that way, or at least it does on my old Samsung Galaxy S5. My new Huawei P30 kills the process as soon as the screen goes to sleep. I’ve tried all the steps listed at https://dontkillmyapp.com/huawei but that doesn’t work for me.
i am also having the same issue in android 6 huawei ALE-21 mobile its always return “OK” instead of location return.any one can help ? i followed the provided by resource in git link but nothing show positive result?