Created
April 26, 2020 09:18
-
-
Save mohsenoid/2f48e5d0591e2ddbf978598faa8e644e to your computer and use it in GitHub Desktop.
CloseToMe - Observing State
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
closeToMe.state.observe(this, Observer { state -> | |
log("Beacon state: $state") | |
when (state) { | |
CloseToMeState.STARTED -> { | |
// do something | |
} | |
else -> { | |
// do other thing | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment