开发者

get location update every 1 hour

开发者 https://www.devze.com 2023-03-02 22:37 出处:网络
I want to get location update after every 1 hour, I don\'t want to be concern with distance, only after every 1 hour I should got current location.

I want to get location update after every 1 hour, I don't want to be concern with distance, only after every 1 hour I should got current location. My code is

mLocation开发者_开发技巧Manager.requestLocationUpdates(provider, 3600000, 0, listener);

so if I pass o as distance so will it give me updation after 1 hour or not


The minDistance parameter (the one you put 0 in) is, as name states, the minimum difference in location that qualifies for being posted as an update. If you put zero there, you'll get notification about any location change, regardless of the distance traveled.

0

精彩评论

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