Google Play服务框架位置有时并未提供确切的位置

时间:2013-12-11 13:12:25

标签: android google-play-services android-location

我开发了以下代码,我们需要用户的确切位置。然而,我的客户说它确切地获得了位置但有时他们错了。怎么了? 谢谢

    mLocationRequest = LocationRequest.create();
        mLocationRequest
                .setInterval(LocationUtils.UPDATE_INTERVAL_IN_MILLISECONDS);
        mLocationRequest
                .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);

        // Set the interval ceiling to one minute
        mLocationRequest
                .setFastestInterval(LocationUtils.FAST_INTERVAL_CEILING_IN_MILLISECONDS);
        mLocationRequest.setSmallestDisplacement(30);
        // Note that location updates are off until the user turns them on
        mUpdatesRequested = true;
        mLocationClient = new LocationClient(this, this, this);

1 个答案:

答案 0 :(得分:0)

你的代码没有错。这是融合提供商的工作方式。在我的观察中,使用它(而不是阅读普通GPS)仍然更好,因为它试图将GPS与三角形位置相结合。但是,您需要确保用户已启用GPS,因为融合提供商不需要启用它。