Created
April 26, 2020 09:19
-
-
Save mohsenoid/cfc723794972e50be51fd0d08aa5d2b0 to your computer and use it in GitHub Desktop.
CloseToMe - Observing Bluetooth 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.isBluetoothEnabled.observe(this, Observer { isActive-> | |
log("Bluetooth isActive: $isActive") | |
if (isActive == false) { | |
// start again | |
} else { | |
// do something | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment