Skip to content

Instantly share code, notes, and snippets.

@louis993546
Created May 14, 2019 23:59
Show Gist options
  • Save louis993546/b72227aacaf8acdfcbba0e501dbca9c0 to your computer and use it in GitHub Desktop.
Save louis993546/b72227aacaf8acdfcbba0e501dbca9c0 to your computer and use it in GitHub Desktop.
val currentLocation: Observable<LatLong> = TODO("the platform API keeps sending signal to this object")
currentLocation.subscribeBy(
onNext -> { latLong -> moveThePin(latLong) },
onError -> { throwable -> TODO("tell user that current location is not retrievable or something") },
onComplete -> { TODO("this is the end of the transmission, turn it off or something") })
fun moveThePin(latLong: LatLong) { TODO("move the Pin") }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment