On Sun, Feb 27, 2011 at 3:56 PM, Mark Murphy <[email protected]>wrote:

> On Sun, Feb 27, 2011 at 12:58 PM, TreKing <[email protected]> wrote:
> > Both conditions must be met. So you if you specify 60 minutes and 60
> meters,
> > the check won't even run for at least an hour.
>
> Actually, that's not true. I thought it was, originally. The distance is a
> filter for what events you receive. The time is merely a guideline, and you
> may get events more frequently than that.


Yeah, sorry. Should not have said "at least" - it is a hint. Actually, not
sure what you mean by "distance is a filter for what events you receive."
But what I mean is that is you set the min time, the check won't run for
*approximately* that long. But I believe it's still true that both
conditions must be met.

I'm basing this on my own tests. I have a feature in my app that looks up
nearby bus stops based on the user location. If the user moves far enough
away, it updates to get the closest stops based on their new location.
Originally, as I only cared about distance, I left min time as 0. The
frequency of the update checks was fairly frequent (this was a while ago, so
I don't remember how frequent, but enough to be noticeable).

Since it was likely the user would not be moving much very much when using
this feature, I didn't want the update check to happen that frequently, so I
added a min time. In one experiment, I set this to 5 minutes. I used the
feature, then hopped on a bus and got significantly further than the min
distance in under 5 minutes. I did not get an update and my nearby stops
list did not refresh until the 5 minutes were up, when the location check
finally kicked in and I my listener was triggered because the distance was
far enough.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to