kw
12/01/2016, 7:54 PMlocationUpdateSubscription = locationUpdatesObservable.subscribe({
loc -> Log.d(TAG,"Loc") //When the first loc is emitted, (I just want to trigger it once) doSomething()
} ,{
err-> ... //error handling
})
when (resultCode) {
Activity.RESULT_OK ->
// All required changes were successfully made, location updates will start coming in
{
Log.d(TAG, "User enabled location")
}