Skip to content

Instantly share code, notes, and snippets.

@mizutori
Created January 10, 2017 23:59
Show Gist options
  • Save mizutori/a3c4efc2e395b82ca5245138fdcdf4a0 to your computer and use it in GitHub Desktop.
Save mizutori/a3c4efc2e395b82ca5245138fdcdf4a0 to your computer and use it in GitHub Desktop.
@Override
public void onLocationChanged(final Location newLocation) {
Log.d(TAG, "(" + newLocation.getLatitude() + "," + newLocation.getLongitude() + ")");
if(isLogging){
locationList.add(newLocation);
}
Intent intent = new Intent("LocationUpdated");
intent.putExtra("location", newLocation);
LocalBroadcastManager.getInstance(this.getApplication()).sendBroadcast(intent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment