RawRangingDevice
public
final
class
RawRangingDevice
extends Object
implements
Parcelable
| java.lang.Object | |
| ↳ | android.ranging.raw.RawRangingDevice |
Represents a device participating in ranging operations. This class supports multiple ranging technologies, including UWB, BLE CS, BLE RSSI and Wi-Fi NAN-RTT. The configuration for each technology is provided through corresponding parameter objects.
Summary
Nested classes | |
|---|---|
class |
RawRangingDevice.Builder
Builder class for creating instances of |
Constants | |
|---|---|
int |
UPDATE_RATE_FREQUENT
Frequent ranging interval. |
int |
UPDATE_RATE_INFREQUENT
Infrequent ranging interval. |
int |
UPDATE_RATE_NORMAL
Normal ranging interval (Default). |
Inherited constants |
|---|
Fields | |
|---|---|
public
static
final
Creator<RawRangingDevice> |
CREATOR
|
Public methods | |
|---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
BleRssiRangingParams
|
getBleRssiRangingParams()
Returns the BLE rssi ranging parameters, if applicable. |
BleCsRangingParams
|
getCsRangingParams()
Returns the CS ranging parameters, if applicable. |
RangingDevice
|
getRangingDevice()
Returns the |
Map<Integer, Duration>
|
getRangingIntervalValues()
Returns a map of ranging technologies to their corresponding ranging interval durations for available ranging technologies parameters. |
RttRangingParams
|
getRttRangingParams()
Returns the RTT ranging parameters, if applicable. |
RttStationRangingParams
|
getRttStationRangingParams()
Returns the Wi-Fi STA-AP ranging parameters, if applicable. |
UwbRangingParams
|
getUwbRangingParams()
Returns the UWB ranging parameters, if applicable. |
String
|
toString()
Returns a string representation of the object. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
|---|---|
Constants
UPDATE_RATE_FREQUENT
public static final int UPDATE_RATE_FREQUENT
Frequent ranging interval.
- UWB - 96 milliseconds for config id
UwbRangingParams.CONFIG_PROVISIONED_UNICAST_DS_TWR_VERY_FAST, 120 milliseconds otherwise. SeeUwbRangingCapabilities.getSupportedRangingUpdateRates()to verify Frequent update rate is supported. - BLE RSSI - 500 milliseconds.
- BLE CS - 100 milliseconds.
- WiFi Rtt - 128 milliseconds if
RttRangingCapabilities.hasPeriodicRangingHardwareFeature()is true, 256 milliseconds otherwise.
Constant Value: 3 (0x00000003)
UPDATE_RATE_INFREQUENT
public static final int UPDATE_RATE_INFREQUENT
Infrequent ranging interval.
- UWB - 600 milliseconds.
- BLE RSSI - 3 seconds.
- BLE CS - 5 seconds.
- WiFi Rtt - 8192 milliseconds otherwise.
Constant Value: 2 (0x00000002)
UPDATE_RATE_NORMAL
public static final int UPDATE_RATE_NORMAL
Normal ranging interval (Default).
- UWB - 200 milliseconds for config ids
UwbRangingParams.getConfigId()with multicast ranging, 240 milliseconds for unicast. - BLE RSSI - 1 second.
- BLE CS - 200 ms.
- WiFi Rtt - 256 milliseconds if
RttRangingCapabilities.hasPeriodicRangingHardwareFeature()is true, 512 milliseconds otherwise.
Constant Value: 1 (0x00000001)
Fields
Public methods
describeContents
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(android.os.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 CONTENTS_FILE_DESCRIPTOR |
getBleRssiRangingParams
public BleRssiRangingParams getBleRssiRangingParams ()
Returns the BLE rssi ranging parameters, if applicable.
| Returns | |
|---|---|
BleRssiRangingParams |
the BleRssiRangingParams, or null if not set. |
getCsRangingParams
public BleCsRangingParams getCsRangingParams ()
Returns the CS ranging parameters, if applicable.
| Returns | |
|---|---|
BleCsRangingParams |
the BleCsRangingParams, or null if not set. |
getRangingDevice
public RangingDevice getRangingDevice ()
Returns the RangingDevice associated with this instance.
| Returns | |
|---|---|
RangingDevice |
the ranging device.
This value cannot be null. |
getRangingIntervalValues
public Map<Integer, Duration> getRangingIntervalValues ()
Returns a map of ranging technologies to their corresponding ranging interval durations for available ranging technologies parameters.
The duration for each technology is determined by its configured
ERROR(RangingUpdateRate/android.ranging.raw.RawRangingDevice.RangingUpdateRate RangingUpdateRate) and, in some cases, technology-specific parameters like
UwbRangingParams.getConfigId() for UWB.
| Returns | |
|---|---|
Map<Integer, Duration> |
A non-null, possibly empty, map where keys are RangingTechnology integers and
values are the calculated Duration for that technology's ranging interval. |
getRttRangingParams
public RttRangingParams getRttRangingParams ()
Returns the RTT ranging parameters, if applicable.
| Returns | |
|---|---|
RttRangingParams |
the RttRangingParams, or null if not set. |
getRttStationRangingParams
public RttStationRangingParams getRttStationRangingParams ()
Returns the Wi-Fi STA-AP ranging parameters, if applicable.
| Returns | |
|---|---|
RttStationRangingParams |
the RttStationRangingParams, or null if not set. |
getUwbRangingParams
public UwbRangingParams getUwbRangingParams ()
Returns the UWB ranging parameters, if applicable.
| Returns | |
|---|---|
UwbRangingParams |
the UwbRangingParams, or null if not set. |
toString
public String toString ()
Returns a string representation of the object.
| Returns | |
|---|---|
String |
a string representation of the object. |
writeToParcel
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 Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-09-17 UTC.