transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
656 stars 277 forks source link

location updates on Android, Xiaomi #1428

Closed azamateo closed 6 days ago

azamateo commented 6 months ago

Your Environment

window.BackgroundGeolocation.ready(configs) .then(()=>{ scheduleStart(); forceStart(); }) .catch((error)=>{ $actions.LogMessage("Error ready config:"+error,1) })

function scheduleStart(){ window.BackgroundGeolocation.startSchedule() .then((state) => { $actions.LogMessage("Schedule Started:"+$parameters.UserName+",State:"+state.enabled,1) }) .catch((error)=>{ $actions.LogMessage("Schedule start error:"+$parameters.UserName+",Error:"+error,1) }) }

function forceStart(){ window.BackgroundGeolocation.getState() .then((state)=>{ if(!state.enabled){ window.BackgroundGeolocation.start() .then((state) => { $actions.LogMessage("Background Geolocation Start:"+$parameters.UserName+",State:"+state.enabled,1) }) .catch((error)=>{ $actions.LogMessage("Background Geolocation Start Error:"+$parameters.UserName+",Error:"+error,1) }) }else{ $actions.LogMessage("Tracking already started:"+$parameters.UserName+",State:"+state.enabled,1) } }) }

Expected Behavior

Plugin is connected to app wich is generated by Outsystems Platform. On other devices like samsung, realme is working well, but xiaomi is not sending locations when app goes to background, battery optimizations is ignored in settings.

Posting locations from device when in background

Actual Behavior

Application sends only one location and when the application is minimized to the background , no data is sent to server

Context

Debug logs

background-geolocation-xiaomi.log



</details>
christocracy commented 6 months ago

See https://dontkillmyapp.com

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 6 days ago

This issue was closed because it has been inactive for 14 days since being marked as stale.