Skip to content

Instantly share code, notes, and snippets.

@tassioauad
Created November 12, 2016 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tassioauad/14a9711f182e82ab75eec180c7becf99 to your computer and use it in GitHub Desktop.
Save tassioauad/14a9711f182e82ab75eec180c7becf99 to your computer and use it in GitHub Desktop.
@Override
public void onConnected(Bundle bundle) {
//Google API connection has been done successfully
LocationRequest locationRequest = new LocationRequest();
locationRequest.setInterval(10000);
locationRequest.setFastestInterval(5000);
locationRequest.setSmallestDisplacement(5);
locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
LocationServices.FusedLocationApi.requestLocationUpdates(googleApiClient, locationRequest, new LocationListener() {
@Override
public void onLocationChanged(Location location) {
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment