Created
September 23, 2011 22:16
-
-
Save jmif/1238589 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
int location_wait_time = getApplicationContext().getResources() | |
.getInteger(R.integer.location_poll_minutes); | |
LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); | |
Intent intent = new Intent(this, LocationReceiver.class); | |
PendingIntent pendingIntent = PendingIntent.getBroadcast(getApplicationContext(), | |
0, intent, 0); | |
//Register for broadcast intents | |
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1 * 1000 * 60, | |
0, pendingIntent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment