java - Filter location updates when using LocationManager requestLocationUpdates method -
i ios developer learning android, please bear me. on ios when getting location updates have sure filter , throw out invalid locations. check things outdated locations based on timestamp, inaccurate locations, etc.
is there preferred way on android or needed? far checking location got not nil:
// other code start locationmanager ... @override public void onlocationchanged(location location) { if (location != null) { // stuff here } }
it's not needed. however, encourage @ new location services apis offered in google play services (http://developer.android.com/google/play-services/location.html)
Comments
Post a Comment