2

I have implemented Google - Fused Location Provider. Like below code...

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 );

but it still shows as a High battery use app. Can any explain what I am doing wrong.

IAmGroot
  • 13,760
  • 18
  • 84
  • 154
  • I am also trying to figure out how to do! I have a question open with a 50 points bounty here: http://stackoverflow.com/questions/28108326/android-google-maps-location-with-low-battery-usage – Daniele B Jan 26 '15 at 03:19

1 Answers1

0

You need to explicitely set the GoogleMap.setLocationSource.

Here is an example: Android: Google Maps location with low battery usage

Community
  • 1
  • 1
Daniele B
  • 19,801
  • 29
  • 115
  • 173