Skip to content

Instantly share code, notes, and snippets.

@mohsenoid
Created April 26, 2020 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohsenoid/2f48e5d0591e2ddbf978598faa8e644e to your computer and use it in GitHub Desktop.
Save mohsenoid/2f48e5d0591e2ddbf978598faa8e644e to your computer and use it in GitHub Desktop.
CloseToMe - Observing State
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