开发者

Manually abort GPS updating in Android

I receive updates from my GPS in this way:

lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 0, locat开发者_JS百科ionListener);

In my onLocationChanged(Location loc)-method I want now to abort updating GPS data by specific criteria...

So how can I undo/disable the requestLocationUpdates(...) ?

Nice greetings, poeschlorn


How about using this method:

http://developer.android.com/reference/android/location/LocationManager.html#removeUpdates%28android.location.LocationListener%29

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜