0

I have been working on utilizing the FusedLocationProviderApi in my android application, however whenever I create the GoogleApiClient as follows:

mGoogleApiClient = new GoogleApiClient.Builder(context)
            .addApi(LocationServices.API)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .build();

The fine location icon in the notification bar turns on before I even call connect on the the client. The contexts I tried this with included activity and application scoped contexts, both yielded the same result.

My problem is that this seems to be keeping the phone awake wasting battery for no reason. The documentation does not mention anything regarding this as far as I could tell.

4

1 回答 1

0

问题已解决,GoogleApiClient 和 GoogleMap 元素之间进行了一些交互。打开的 GPS 无线电来自地图元素,但由 GoogleApiClient 的创建触发。

于 2014-12-15T19:31:25.197 回答