Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // makeScreenGoBlue, makeScreenGoWhite and displayToast are lambdas
- // The code below describes the rules for ProximityObserver
- // that will scan the beacons around you and invoke your actions
- // when given conditions are met.
- val rule = proximityObserver.ruleBuilder()
- .forAttachmentKey("shop")
- .withDesiredMeanTriggerDistance(2.0)
- .withOnEnterAction(makeScreenGoBlue)
- .withOnExitAction(makeScreenGoWhite)
- .withOnChangeAction(displayToast)
- .create()
Add Comment
Please, Sign In to add comment