It's not needed. However, I also encourage you to look at the new Location Services APIs offered in Google Play Services (http://developer.android.com/google/play-services/location.html)
Filter location updates when using LocationManager requestLocationUpdates method
-
26-06-2022 - |
Pregunta
I am an iOS
developer learning Android
, so please bear with me. On iOS
when getting location updates we have to be sure to filter those and throw out invalid locations. We check for things like outdated locations based on timestamp, inaccurate locations, etc.
Is there a preferred way to do this on Android
or is this even needed? So far I am just checking that the location
I got is not nil:
// All my other code to start my LocationManager
...
@Override
public void onLocationChanged(Location location)
{
if (location != null)
{
// Do stuff here
}
}
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow