android smartLocation库->在onLocationUpdated的某些地方永远不会触发

时间:2018-12-24 11:55:54

标签: android location

我的代码是:

LocationParams.Builder builder = new LocationParams.Builder()
                .setAccuracy(trackingAccuracy)
                .setDistance(trackingDistance)
                .setInterval(interval);


        LocationGooglePlayServicesWithFallbackProvider provider =
                new LocationGooglePlayServicesWithFallbackProvider(this);

        SmartLocation smartLocation = new SmartLocation.Builder(this).logging(true).build();

        smartLocation.location(provider).continuous()
                .config(builder.build()).start(this);

        smartLocation.activity().start(this);

在大多数地方,它可以正常工作,但是在某些地方,onLocationUpdated永远不会触发。 反正有没有检查为什么未触发?

0 个答案:

没有答案