开发者

Problem in getting location updates periodically

I am using the Location Manager to get location updates. I used Location Manager's RequestLocationUpdates(provider,timeinmilliseconds,distanceinmeters,list开发者_如何学编程ener).

When do i provide minimum delay of 30 seconds to get next location updates, i assume that it should rest for 30 seconds to request for new location updates.But what i observed,it is not happening.

I tried specifying minimum distance too, still didn't get what i expected.

What i want is to get location updates after every 10 MINUTES or after moving a distance of 100 meters periodically. But i don't want to use any Timer thread or do any calculation to be sure that i have moved by a distance of 100 meters.

Is it possible to get this thing using location manager only?

Any help would be appreciated.

Thanks in advance.


When do i provide minimum delay of 30 seconds to get next location updates, i assume that it should rest for 30 seconds to request for new location updates.

That is a flawed assumption.

But what i observed,it is not happening.

Correct. The time period you specify is merely a hint. The distance you specify should serve as a filter.

What i want is to get location updates after every 10 MINUTES or after moving a distance of 100 meters periodically.

OK.

But i don't want to use any Timer thread or do any calculation to be sure that i have moved by a distance of 100 meters.

You are going to need something to let you know when 10 minutes has elapsed.

Is it possible to get this thing using location manager only?

No, sorry.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜