I need to get background geo location when app running in foreground or background every 30 mins or 1 km distance movement
Actual Behavior
When i call the method backgroundgeolocationupdate() it works properly and i can able to get the location update properly by onlocation() but after closed the app from background again i opened then i called the backgroundgeolocationupdate() method i got error "Uncaught (in promise): Waiting for previous start action to complete" I used stopOnTerminate as true but still i got error
Steps to Reproduce
1.Called the method backgroundgeolocationupdate() first time after login
2.Closed the app from Background
3.Opened the app and called the method backgroundgeolocationupdate() again.
4.Shows error "Uncaught (in promise): Waiting for previous start action to complete" location update also not working
Your Environment
Plugin version:4.16.5
Platform: :Android
OS version:Android 14
Device manufacturer / model:Vivo
Cordova version (cordova -v):12.0.0 (cordova-lib@12.0.1)
Cordova platform version (cordova platform ls):
Installed platforms: android 10.1.2 ios 6.3.0 Available platforms: browser electron PASTE_YOUR_CODE_HERE backgroundgeolocationupdate(){ BackgroundGeolocation.ready({ distanceFilter:0,
BackgroundGeolocation.onLocation (location => { console.log("[Location -manual movement changes] ", location);
console.log(location.is_moving)
});
BackgroundGeolocation.onMotionChange(event => { console.log("[motionchange] ", event);
});
BackgroundGeolocation.onHttp(response => { console.log("[http] ", response); });
BackgroundGeolocation.onActivityChange(activityEvent => { console.log("[activitychange] ", activityEvent); });
BackgroundGeolocation.onProviderChange(providerEvent => { console.log("[providerchange] ", providerEvent); });
const subscription = BackgroundGeolocation.onHeartbeat((event) => { console.log("[onHeartbeat] ", event);
BackgroundGeolocation.getCurrentPosition({ samples: 1, persist: true }).then((location) => { console.log("[getCurrentPosition] ", location); }); }) }); } else { console.log('enabled'); }
}
Expected Behavior
I need to get background geo location when app running in foreground or background every 30 mins or 1 km distance movement
Actual Behavior
When i call the method backgroundgeolocationupdate() it works properly and i can able to get the location update properly by onlocation() but after closed the app from background again i opened then i called the backgroundgeolocationupdate() method i got error "Uncaught (in promise): Waiting for previous start action to complete" I used stopOnTerminate as true but still i got error
Steps to Reproduce
1.Called the method backgroundgeolocationupdate() first time after login 2.Closed the app from Background 3.Opened the app and called the method backgroundgeolocationupdate() again. 4.Shows error "Uncaught (in promise): Waiting for previous start action to complete" location update also not working
Context
Debug logs
Logs
``` PASTE_YOUR_LOGS_HERE ```