Created
November 18, 2013 16:30
-
-
Save blangel/7530830 to your computer and use it in GitHub Desktop.
Setup LocationClient
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 static final long UPDATE_INTERVAL_MS = 8000L; | |
private static final long FASTEST_UPDATE_INTERVAL_MS = 4000L; | |
... | |
LocationRequest locationRequest = LocationRequest.create(); | |
locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); | |
locationRequest.setInterval(UPDATE_INTERVAL_MS); | |
locationRequest.setFastestInterval(FASTEST_UPDATE_INTERVAL_MS); | |
locationClient.requestLocationUpdates(locationRequest, listener, locationService.getLocationLooper()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment