开发者

Manually abort GPS updating in Android

开发者 https://www.devze.com 2023-01-01 15:03 出处:网络
I receive updates from my GPS in this way: lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 0, locat开发者_JS百科ionListener);

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

精彩评论

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