P.s., do *not* hard code that "gps" string!  Use
LocationManager.GPS_PROVIDER instead...

kris

On Thu, Dec 15, 2011 at 9:49 AM, Kristopher Micinski
<krismicin...@gmail.com> wrote:
> On Thu, Dec 15, 2011 at 9:32 AM, Markus Unger
> <markus.unger1...@googlemail.com> wrote:
>> Hello!
>>
>> The method "requestLocationUpdates"
>>
>> public void requestLocationUpdates (String provider, long minTime,
>> float minDistance, LocationListener listener)
>>
>> has minTime and a minDistance. So if I would say
>>
>> requestLocationUpdates ("gps", 1000l * 60l * 5l, 0, new
>> LocationListener....);
>>
>> I will receiver every 5 Minutes a location or? I know that it can be
>> longer... But could it be shorter?
>>
>> Currently I do it every 5 Minutes with 0 Meters and I receive
>> sometimes 50 Locations in a minute.. it wait's and I get 10-20 Seconds
>> later the next, then 40 Seconds...
>>
>> But it is definitely NOT every 5 Minutes or longer...
>>
>> Thanks for help!
>> Regards, Markus
>>
>
> The docs say:
>
> minTime the minimum time interval for notifications, in milliseconds.
> This field is only used as a hint to conserve power, and actual time
> between location updates may be greater or lesser than this value.
>
> In practice this is just that, a hint, you can look through the
> LocationManager implementation if you'd like to find out exactly why
> this happening, but I wouldn't worry about it too much, what are you
> worried about?
>
> If you only need the location at very coarse intervals, have you
> thought of using requestSingleUpdate, then waiting some long amount of
> time?
>
> Here you have much better control over the temporal distribution of
> your updates.
>
> (I'm assuming you're concerned about power usage..)
>
> Kris

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

Reply via email to