Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin posting old location with the updated location #232

Closed
itstyro opened this issue Aug 19, 2015 · 2 comments
Closed

Plugin posting old location with the updated location #232

itstyro opened this issue Aug 19, 2015 · 2 comments

Comments

@itstyro
Copy link

itstyro commented Aug 19, 2015

Hi Chris,

Thank you for serving million people with this great plugin.

Chris, i'm using this plugin on android device and i've set the locationTimeout property to be 5 minutes.
locationTimeout:300 // 5 minutes
But whenever plugin posts the location data after 5 minutes. it makes 3 consecutive post request to the server and it is sending the old location with the updated one. I just need to get only the updated location.

Please do the possible.

Thank you,
Munish

@parmod-arora
Copy link

I also found this issue in android.

Please check if you resolved the issue with this commit

parmod-arora@3f56a9e

#235

@christocracy
Copy link
Owner

That commit looks naive and dangerous to me. Simply deleting all locations in cache after a single successful POST?? What if the user was simply had no cell-service for a time (say 1 hour) and the plugin kept recording GPS locations? When he comes back online, the plugin is going to attempt to sync each saved location to the server, one-by-one, deleting only when the server returns http 200.

I'm not going to merge that. Are you sure your server is return HTTP status 200?

Are you monitoring adb log? The plugin logs the HTTP response status it receives from server.

$ adb logcat -s LocationUpdateService
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants