我是学习iOSAndroid开发人员,所以请耐心等待。在iOS上,当获取位置更新时,我们必须确保将其过滤并丢弃无效的位置。我们会根据时间戳检查过时的位置,不准确的位置等信息。

是否有在[cc]上执行此操作的首选方法,或者甚至需要这样做?到目前为止,我只是在检查我得到的Android是否为nil:

// All my other code to start my LocationManager
...

@Override
 public void onLocationChanged(Location location)
 {
    if (location != null)
    {

        // Do stuff here

    }
 }

最佳答案

不需要但是,我也鼓励您查看Google Play服务(http://developer.android.com/google/play-services/location.html)中提供的新的位置服务API。

10-07 19:25
查看更多