public enum RangingRole

  1. Object
  2. Enum<RangingRole>
  3. RangingRole

ImplementsComparable<RangingRole>

Which end of a UWB session this device is.

The distinction is real on Android, where the controller owns the channel and session parameters and the controlee joins them, and it decides which side has to publish a token first. It is invisible on iOS: Nearby Interaction negotiates the roles itself, both peers publish a discovery token, and the value passed here is ignored. Code that will run on both should still pick a role – one side controller, the other controlee – because that costs nothing on iOS and is required on Android.

Enum constants

CONTROLLERThis device chooses the channel and session parameters and publishes them; peers join.
CONTROLEEThis device joins a session whose parameters the controller chose.

Methods

public static RangingRole[] values()
public static RangingRole valueOf(String name)

Inherited methods

Enum constant details

CONTROLLER

CONTROLLER
This device chooses the channel and session parameters and publishes them; peers join. Exactly one side of a session is the controller.

CONTROLEE

CONTROLEE
This device joins a session whose parameters the controller chose.

Method details

values

public static RangingRole[] values()

valueOf

public static RangingRole valueOf(String name)