public
final
class
RangingPreference
extends Object
implements
Parcelable
Represents the configuration preferences for a ranging session.
The RangingPreference class allows users to specify various parameters
required for a ranging session, including ranging parameters, sensor fusion settings,
and data notification configurations. It provides a Builder to construct
an instance with custom configurations.
Summary
Nested classes | |
|---|---|
class |
RangingPreference.Builder
Builder for creating instances of |
Constants | |
|---|---|
int |
DEVICE_ROLE_DT_TAG
The device that is a DT tag. |
int |
DEVICE_ROLE_INITIATOR
The device that initiates the session. |
int |
DEVICE_ROLE_RESPONDER
The device that responds to a session. |
Inherited constants | ||||
|---|---|---|---|---|
|
From interface
|
Fields | |
|---|---|
public
static
final
Creator<RangingPreference> |
CREATOR
|
Public methods | |
|---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
int
|
getDeviceRole()
Returns the device role. |
RangingConfig
|
getRangingParams()
Returns the ranging parameters associated with this preference. |
SessionConfig
|
getSessionConfig()
Returns the ranging session configuration params. |
String
|
toString()
Returns a string representation of the object. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
| |||||||||||||||||||||||
|
From interface
| |||||||||||||||||||||||
Constants
DEVICE_ROLE_DT_TAG
Added in API level 36
public static final int DEVICE_ROLE_DT_TAG
The device that is a DT tag.
This is only allowed in the RAW API usage.
Constant Value: 2 (0x00000002)
DEVICE_ROLE_INITIATOR
Added in API level 36
public static final int DEVICE_ROLE_INITIATOR
The device that initiates the session.
Constant Value: 1 (0x00000001)
DEVICE_ROLE_RESPONDER
Added in API level 36
public static final int DEVICE_ROLE_RESPONDER
The device that responds to a session.
Constant Value: 0 (0x00000000)
Fields
Public methods
describeContents
Added in API level 36
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(Parcel,int),
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR bit.
| Returns | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or
|
getDeviceRole
Added in API level 36
public int getDeviceRole ()
Returns the device role.
| Returns | |
|---|---|
int |
Value is one of the following: |
getRangingParams
Added in API level 36
public RangingConfig getRangingParams ()
Returns the ranging parameters associated with this preference.
| Returns | |
|---|---|
RangingConfig |
the RangingConfig or null if not set. |
getSessionConfig
Added in API level 36
public SessionConfig getSessionConfig ()
Returns the ranging session configuration params.
| Returns | |
|---|---|
SessionConfig |
a non-null SessionConfig instance. |
toString
Added in API level 36
public String toString ()
Returns a string representation of the object.
| Returns | |
|---|---|
String |
a string representation of the object. |
writeToParcel
Added in API level 36
public void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
int: Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:
|