Guest User

Untitled

a guest
Oct 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. // makeScreenGoBlue, makeScreenGoWhite and displayToast are lambdas
  2. // The code below describes the rules for ProximityObserver
  3. // that will scan the beacons around you and invoke your actions
  4. // when given conditions are met.
  5. val rule = proximityObserver.ruleBuilder()
  6. .forAttachmentKey("shop")
  7. .withDesiredMeanTriggerDistance(2.0)
  8. .withOnEnterAction(makeScreenGoBlue)
  9. .withOnExitAction(makeScreenGoWhite)
  10. .withOnChangeAction(displayToast)
  11. .create()
Add Comment
Please, Sign In to add comment