API doesn't always return the most recent location

127 views
Skip to first unread message

Deryk Piper

unread,
Mar 14, 2012, 10:40:56 AM3/14/12
to google-la...@googlegroups.com
Good day all!

I've got a simple Latitude application written in Visual Basic, whose job it is to poll Latitude for my location and determine how far I am from home.  The polling period is normally 5 minutes, but it can go down to 90 seconds if the application determines that I'm "moving" (the exact definition of "moving" is somewhat unique, but irrelevant here).

The problem I'm having is that the API is returning the most recent location every 10 minutes or so, however if I check my Location History in a web browser I can see that my phone is updating my location multiple times a minute.

For example, my phone will update Latitude as follows:

12:00
12:01
12:02
12:03
...
12:10

When my application requests the current location at 12:00, 12:05 and 12:10, it only ever sees the 12:00 and 12:10 location updates.

I can't recall when this problem started happening; I do know that, once upon a time, I could get an updated location every 5 minutes or less - ie, whenever my application polled the Latitude API.

I've thought that caching may be part of the problem, so I've added a "cache-breaker" to my Latitude poll request:


This has not resolved the problem.  I've also tried revoking access to my application from within my Google account and then re-authorizing, but the problem still exists.

This is very hard to debug as, generally speaking, I can't change my location while debugging the program.

Does anybody know if Google restricts the polling frequency?  I know that Google allows 1,000,000 requests/day from the application and 1 request/user/minute.  But I'm not even close to hitting those limits.

Thanks in advance!

Deryk Piper

unread,
Mar 23, 2012, 10:21:42 AM3/23/12
to google-la...@googlegroups.com
I've been able to determine that my application is capable of receiving data more frequently from Latitude.  The problem appears to be that my Google account only makes data available at ~10 minute intervals despite the Latitude History webpage showing much more data points than that.

My wife recently re-enabled Latitude on her phone and I was happy to see discrete Latitude location updates coming in to my application every 90 seconds or so - ie, matching the application's quickest polling frequency.

So does anybody know what it may be about a particular Google account that limits how often it makes the current "best" location available?

Thanks.

Josh Livni

unread,
Mar 23, 2012, 1:21:26 PM3/23/12
to google-la...@googlegroups.com
Hi Deryk,

Just to clarify, it sounds like you are saying that you can go to the online Latitude page for your own account, and it might show more recent data than you are able to access via the API (for example at 12.05 your location on the Latitude webpage will show an update from maybe 12.04, but an API call at that instant will only show 12.10).  Is this correct?  

Cheers,

  -Josh

--
You received this message because you are subscribed to the Google Groups "Google Latitude API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-latitude-api/-/o8qbvIAGAewJ.

To post to this group, send email to google-la...@googlegroups.com.
To unsubscribe from this group, send email to google-latitude...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-latitude-api?hl=en.

Deryk Piper

unread,
Mar 23, 2012, 1:36:28 PM3/23/12
to google-la...@googlegroups.com
Hi Josh,

Thanks for replying!

Your example is mostly correct - except that when my application polls Latitude at 12:05 it will only get the location from 12:00.

So let's say that my phone updates my location at 11:59 and 12:04.  My application checks at 12:00 and gets the update from 11:59.  Then my application checks again at 12:05 but still gets the "current best" location from 11:59.

Meanwhile if I check online at 12:05 I will see the updates from 11:59 and 12:04.

However, it would seem that when my application checks my wife's Latitude location, it would get the updates from both 11:59 and 12:04.



On Friday, March 23, 2012 1:21:26 PM UTC-4, Josh Livni wrote:
Hi Deryk,

Just to clarify, it sounds like you are saying that you can go to the online Latitude page for your own account, and it might show more recent data than you are able to access via the API (for example at 12.05 your location on the Latitude webpage will show an update from maybe 12.04, but an API call at that instant will only show 12.10).  Is this correct?  

Cheers,

  -Josh

On Fri, Mar 23, 2012 at 7:21 AM, Deryk Piper wrote:
I've been able to determine that my application is capable of receiving data more frequently from Latitude.  The problem appears to be that my Google account only makes data available at ~10 minute intervals despite the Latitude History webpage showing much more data points than that.

My wife recently re-enabled Latitude on her phone and I was happy to see discrete Latitude location updates coming in to my application every 90 seconds or so - ie, matching the application's quickest polling frequency.

So does anybody know what it may be about a particular Google account that limits how often it makes the current "best" location available?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Google Latitude API" group.
To view this discussion on the web visit https://groups.google.com/d/​msg/google-latitude-api/-/​o8qbvIAGAewJ.

To post to this group, send email to google-latitude-api@​googlegroups.com.
To unsubscribe from this group, send email to google-latitude-api+​unsub...@googlegroups.com.

Josh Livni

unread,
Mar 23, 2012, 2:43:38 PM3/23/12
to google-la...@googlegroups.com
Can you fill out a new issue at http://code.google.com/p/latitude-api/issues/list with these details?  I will link that to an internal bug I've just filed with the team so they can look into it.

Thanks,

  -Josh

To view this discussion on the web visit https://groups.google.com/d/msg/google-latitude-api/-/3mVA9MWgZw8J.

To post to this group, send email to google-la...@googlegroups.com.
To unsubscribe from this group, send email to google-latitude...@googlegroups.com.

Deryk Piper

unread,
Mar 26, 2012, 2:25:07 PM3/26/12
to google-la...@googlegroups.com
Thanks Josh - issue is created as Issue #36

DP


On Friday, March 23, 2012 2:43:38 PM UTC-4, Josh Livni wrote:
Can you fill out a new issue at http://code.google.com/p/latitude-api/issues/list with these details?  I will link that to an internal bug I've just filed with the team so they can look into it.

Thanks,

  -Josh

刘波

unread,
May 27, 2012, 12:03:40 AM5/27/12
to google-la...@googlegroups.com


在 2012年3月14日星期三UTC+8下午10时40分56秒,Deryk Piper写道:
Reply all
Reply to author
Forward
0 new messages