我已经实施了Google - Fused Location Provider。如下面的代码...
LocationRequest locationrequest = LocationRequest.create();
locationrequest.setPriority(LocationRequest.PRIORITY_LOW_POWER);
LocationListener locationListener = new LocationListener() {
@Override
public void onLocationChanged(Location location) {
sendLocationUpdate(location,this);
locationclient.removeLocationUpdates(locationListener);
locationclient.disconnect();
}
};
locationrequest.setInterval(UPDATE_INTERVAL);
locationclient.requestLocationUpdates(locationrequest, locationListener );
但它仍然显示为高电池使用应用程序。可以解释我做错了什么。
答案 0 :(得分:0)
您需要明确设置Google Map.set位置源。
以下是一个示例:Android: Google Maps location with low battery usage