# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Methods | Inherited Methods

# WifiRttManager

`public class WifiRttManager`
`extends Object` ``

java.lang.Object
↳ | android.net.wifi.rtt.WifiRttManager

This class provides the primary API for measuring distance (range) to other devices using the IEEE 802.11mc Wi-Fi Round Trip Time (RTT) technology.

The devices which can be ranged include:

- Access Points (APs)
- Wi-Fi Aware peers

  Ranging requests are triggered using `startRanging(android.net.wifi.rtt.RangingRequest, java.util.concurrent.Executor, android.net.wifi.rtt.RangingResultCallback)`. Results (in case of successful operation) are returned in the `RangingResultCallback#onRangingResults(List)` callback.

  Wi-Fi RTT may not be usable at some points, e.g. when Wi-Fi is disabled. To validate that the functionality is available use the `isAvailable()` function. To track changes in RTT usability register for the `ACTION_WIFI_RTT_STATE_CHANGED` broadcast. Note that this broadcast is not sticky - you should register for it and then check the above API to avoid a race condition.

  ## Summary

  ### Constants
  `String` | `ACTION_WIFI_RTT_STATE_CHANGED` Broadcast intent action to indicate that the state of Wi-Fi RTT availability has changed.

  ### Public methods
  `boolean` | `isAvailable()` Returns the current status of RTT API: whether or not RTT is available.
  `void` | `startRanging(RangingRequest request, Executor executor, RangingResultCallback callback)` Initiate a request to range to a set of devices specified in the `RangingRequest`.

  ### Inherited methods
  From class `java.lang.Object`
  `Object` | `clone()` Creates and returns a copy of this object.
  `boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
  `void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
  `final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
  `int` | `hashCode()` Returns a hash code value for the object.
  `final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
  `final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
  `String` | `toString()` Returns a string representation of the object.
  `final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
  `final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
  `final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

  ## Constants

  ### ACTION_WIFI_RTT_STATE_CHANGED

      public static final String ACTION_WIFI_RTT_STATE_CHANGED

  Broadcast intent action to indicate that the state of Wi-Fi RTT availability has changed. Use the `isAvailable()` to query the current status. This broadcast is not sticky, use the `isAvailable()` API after registering the broadcast to check the current state of Wi-Fi RTT.

  Note: The broadcast is only delivered to registered receivers - no manifest registered components will be launched.

  Constant Value: "android.net.wifi.rtt.action.WIFI_RTT_STATE_CHANGED"

  ## Public methods

  ### isAvailable

      public boolean isAvailable ()

  Returns the current status of RTT API: whether or not RTT is available. To track changes in the state of RTT API register for the `ACTION_WIFI_RTT_STATE_CHANGED` broadcast.

  Note: availability of RTT does not mean that the app can use the API. The app's permissions and platform Location Mode are validated at run-time.

  Returns
  `boolean` | A boolean indicating whether the app can use the RTT API at this time (true) or not (false).

  ### startRanging

      public void startRanging (RangingRequest request,
                      Executor executor,
                      RangingResultCallback callback)

  Initiate a request to range to a set of devices specified in the `RangingRequest`. Results will be returned in the `RangingResultCallback` set of callbacks.
  Requires `Manifest.permission.ACCESS_FINE_LOCATION` and `Manifest.permission.CHANGE_WIFI_STATE` and `Manifest.permission.ACCESS_WIFI_STATE`

  Parameters
  `request` | `RangingRequest`: A request specifying a set of devices whose distance measurements are requested. This value cannot be `null`.
  `executor` | `Executor`: The Executor on which to run the callback. This value cannot be `null`. Callback and listener events are dispatched through this `Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `Context.getMainExecutor()`. To dispatch events through a shared thread pool, you can use `AsyncTask#THREAD_POOL_EXECUTOR`.
  `callback` | `RangingResultCallback`: A callback for the result of the ranging request. This value cannot be `null`.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*