Created
March 25, 2020 22:59
-
-
Save jcbribeiro/f646cd48f143689d0d377e5f047c7cfb to your computer and use it in GitHub Desktop.
register walkingWithHeadphonesFence
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
| val walkingWithHeadphonesFence = AwarenessFence.and( | |
| walkingFence, headphoneFence | |
| ) | |
| addFence("walkingWithHeadphonesFence", walkingWithHeadphonesFence) | |
| /* in FenceReceiver | |
| "walkingWithHeadphonesFence" -> when (fenceState.currentState) { | |
| FenceState.TRUE -> fenceInfo = "TRUE | Walking with headphones plugged in." | |
| FenceState.FALSE -> fenceInfo = "FALSE | Not walking with headphones plugged in." | |
| FenceState.UNKNOWN -> fenceInfo = "Error: unknown state." | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment