Skip to content

Instantly share code, notes, and snippets.

@mizutori
Last active January 6, 2019 08:55
Show Gist options
  • Select an option

  • Save mizutori/215768d6829b5838254c2afc4f08b480 to your computer and use it in GitHub Desktop.

Select an option

Save mizutori/215768d6829b5838254c2afc4f08b480 to your computer and use it in GitHub Desktop.
override fun onLocationChanged(newLocation: Location?) {
newLocation?.let{
Log.d(LOG_TAG, "(" + it.latitude + "," + it.longitude + ")")
gpsCount++
if (isLogging) {
locationList.add(newLocation);
}
val intent = Intent("LocationUpdated")
intent.putExtra("location", it)
LocalBroadcastManager.getInstance(this.application).sendBroadcast(intent)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment