Search code examples
androidkotlinproximityestimoteandroid-ibeacon

Detect individual beacon using proximity SDK


I have used this example to detect beacons. In this example, Is it possible to detect which beacon is triggering the action?


Solution

  • You can do that with the ProximityZoneContext object that's being passed to the onEnter/onExit actions:

    val proximityZone = ProximityZoneBuilder()
                .forTag("my-beacons")
                .inNearRange()
                .onEnter {
                    Log.i(TAG, "onEnter: ${it.deviceId}")
                }
                .build()