Last active
August 29, 2015 14:06
-
-
Save ecgreb/98e406eaef43149ab9ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void onLocationClientConnected() { | |
Location lastLocation = locationClient.getLastLocation(); | |
if (lastLocation != null) { | |
// do stuff | |
} | |
LocationRequest locationRequest = LocationRequest.create(); | |
locationRequest.setInterval(5000); | |
locationClient.requestLocationUpdates(locationRequest, | |
new LocationListener() { | |
@Override public void onLocationChanged(Location location) { | |
// do more stuff | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment