Multiple key values to a zone?

When you’re creating a new proximityZone using the builder - is there a way to add multiple key value to the > > proximityObserver.zoneBuilder().forAttachmentKeyAndValue(“key”, “Value”)

Hey @nikkysc

You can achieve that by creating two (or more) similar zones, that differs in key/value pair. All of them can invoke the same action in onEnter/onExit. Something like this:

        val beetrootDeskZone = proximityObserver.zoneBuilder()
                .forAttachmentKeyAndValue("desk", "beetroot")
                .inNearRange()
                .withOnEnterAction(beetrootEnterAction)
                .withOnExitAction(beetrootExitAction)
                .create()

        val anotherBeetrootDeskZone = proximityObserver.zoneBuilder()
                .forAttachmentKeyAndValue("another_desk", "another_beetroot")
                .inNearRange()
                .withOnEnterAction(beetrootEnterAction)
                .withOnExitAction(beetrootExitAction)
                .create()

Regards,
Paweł

Thanks - I’ll give that a go :slight_smile:

Also is there a way to update/or add new zones to monitor without having to update the deployed app??:confused: