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

API calls to backend server calling pending in the background mode after 5 minutes #1424

Closed vgirik closed 6 days ago

vgirik commented 6 months ago

Your Environment

Expected Behavior

We are using the cordova plug-in , to capture geo location when the app is locked or minimized.

Actual Behavior

the geolocation are posting until 5 min after that every call to backend server is falling under pending , even though server is normally responding. After bring the app to foreground, all the pending calls are submitted and getting response immediately from sever. This issue is only happening in Android, iOS it is working fine.

Steps to Reproduce

Cordova - 11.0.0 Android platform 10.1.2 Android API version - 33 Ionic - 6.1.7 cordova-background-geolocation-lt - 4.13.1

christocracy commented 6 months ago

Why are you using .watchPosition? That method is designed to be used for short periods while your app is in the foreground. It is not to be used for long periods in the background.

The plug-in does not require you to use that method at all.

See wiki "Philosophy of Operation".

vgirik commented 6 months ago

Do you want us to use .ready or .setConfig with backend URL?

christocracy commented 6 months ago

.setConfig is for changing the Config After you've called .ready. .ready accepts the same Config options as .setConfig.

You must call .ready once, each time your app is launched.

Using .setConfig is optional and only required when you wish to change the Config provided to .ready.

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.