public class RttManager extends Object
Modifier and Type | Class and Description |
---|---|
class |
RttManager.Capabilities
Deprecated.
Use the new
RttManager.RttCapabilities API |
static class |
RttManager.ParcelableRttParams
pseudo-private class used to parcel arguments
|
static class |
RttManager.ParcelableRttResults
pseudo-private class used to parcel results.
|
static class |
RttManager.ResponderCallback
Callbacks for responder operations.
|
static class |
RttManager.ResponderConfig
Configuration used for RTT responder mode.
|
static class |
RttManager.RttCapabilities
This class describe the RTT capability of the Hardware
|
static interface |
RttManager.RttListener |
static class |
RttManager.RttParams
specifies parameters for RTT request
|
static class |
RttManager.RttResult
specifies RTT results
|
static class |
RttManager.WifiInformationElement |
Modifier and Type | Field and Description |
---|---|
static int |
BASE |
static int |
CMD_OP_ABORTED |
static int |
CMD_OP_DISABLE_RESPONDER |
static int |
CMD_OP_ENABLE_RESPONDER |
static int |
CMD_OP_ENALBE_RESPONDER_FAILED |
static int |
CMD_OP_ENALBE_RESPONDER_SUCCEEDED |
static int |
CMD_OP_FAILED |
static int |
CMD_OP_START_RANGING |
static int |
CMD_OP_STOP_RANGING |
static int |
CMD_OP_SUCCEEDED |
static String |
DESCRIPTION_KEY |
static int |
PREAMBLE_HT |
static int |
PREAMBLE_LEGACY
RTT Preamble Support bit mask
|
static int |
PREAMBLE_VHT |
static int |
REASON_INITIATOR_NOT_ALLOWED_WHEN_RESPONDER_ON
Ranging failed because responder role is enabled in STA mode.
|
static int |
REASON_INVALID_LISTENER |
static int |
REASON_INVALID_REQUEST |
static int |
REASON_NOT_AVAILABLE |
static int |
REASON_PERMISSION_DENIED
Do not have required permission
|
static int |
REASON_UNSPECIFIED |
static int |
RTT_BW_10_SUPPORT |
static int |
RTT_BW_160_SUPPORT |
static int |
RTT_BW_20_SUPPORT |
static int |
RTT_BW_40_SUPPORT |
static int |
RTT_BW_5_SUPPORT
RTT BW supported bit mask, used as RTT param bandWidth too
|
static int |
RTT_BW_80_SUPPORT |
static int |
RTT_CHANNEL_WIDTH_10
Deprecated.
It is not supported anymore.
Use
RTT_BW_10_SUPPORT API. |
static int |
RTT_CHANNEL_WIDTH_160
Deprecated.
It is not supported anymore.
Use
RTT_BW_160_SUPPORT API. |
static int |
RTT_CHANNEL_WIDTH_20
Deprecated.
It is not supported anymore.
Use
RTT_BW_20_SUPPORT API. |
static int |
RTT_CHANNEL_WIDTH_40
Deprecated.
It is not supported anymore.
Use
RTT_BW_40_SUPPORT API. |
static int |
RTT_CHANNEL_WIDTH_5
Deprecated.
It is not supported anymore.
Use
RTT_BW_5_SUPPORT API. |
static int |
RTT_CHANNEL_WIDTH_80
Deprecated.
It is not supported anymore.
Use
RTT_BW_80_SUPPORT API. |
static int |
RTT_CHANNEL_WIDTH_80P80
Deprecated.
not supported anymore
|
static int |
RTT_CHANNEL_WIDTH_UNSPECIFIED
Deprecated.
channel info must be specified.
|
static int |
RTT_PEER_NAN |
static int |
RTT_PEER_P2P_CLIENT |
static int |
RTT_PEER_P2P_GO |
static int |
RTT_PEER_TYPE_AP |
static int |
RTT_PEER_TYPE_STA |
static int |
RTT_PEER_TYPE_UNSPECIFIED
Deprecated.
It is not supported anymore.
|
static int |
RTT_STATUS_ABORTED
Request abort fro uncertain reason
|
static int |
RTT_STATUS_FAIL_AP_ON_DIFF_CHANNEL
Destination is on a different channel from the RTT Request
|
static int |
RTT_STATUS_FAIL_BUSY_TRY_LATER
destination is busy now, you can try after a specified time from destination
|
static int |
RTT_STATUS_FAIL_FTM_PARAM_OVERRIDE
Responder overrides param info, cannot range with new params 2-side RTT only
|
static int |
RTT_STATUS_FAIL_INVALID_TS
The T1-T4 or TOD/TOA Timestamp is illegal
|
static int |
RTT_STATUS_FAIL_NO_CAPABILITY
This type of Ranging is not support by Hardware
|
static int |
RTT_STATUS_FAIL_NO_RSP
Destination does not respond to RTT request
|
static int |
RTT_STATUS_FAIL_NOT_SCHEDULED_YET |
static int |
RTT_STATUS_FAIL_PROTOCOL
11mc protocol level failed, eg, unrecognized FTMR/FTM frame
|
static int |
RTT_STATUS_FAIL_REJECTED
RTT request is rejected by the destination.
|
static int |
RTT_STATUS_FAIL_SCHEDULE
Request can not be scheduled by hardware
|
static int |
RTT_STATUS_FAIL_TM_TIMEOUT
Timing measurement timeout
|
static int |
RTT_STATUS_FAILURE
General failure
|
static int |
RTT_STATUS_INVALID_REQ
Bad Request argument
|
static int |
RTT_STATUS_NO_WIFI
Wifi is not enabled
|
static int |
RTT_STATUS_SUCCESS |
static int |
RTT_TYPE_11_MC
Deprecated.
It is not supported anymore.
|
static int |
RTT_TYPE_11_V
Deprecated.
It is not supported anymore.
|
static int |
RTT_TYPE_ONE_SIDED |
static int |
RTT_TYPE_TWO_SIDED |
static int |
RTT_TYPE_UNSPECIFIED
Deprecated.
It is Not supported anymore.
|
Constructor and Description |
---|
RttManager(Context context,
IRttManager service,
Looper looper)
Create a new WifiScanner instance.
|
Modifier and Type | Method and Description |
---|---|
void |
disableResponder(RttManager.ResponderCallback callback)
Disable Wi-Fi RTT responder mode on the device.
|
void |
enableResponder(RttManager.ResponderCallback callback)
Enable Wi-Fi RTT responder mode on the device.
|
RttManager.Capabilities |
getCapabilities()
Deprecated.
Use the new
getRttCapabilities() API. |
RttManager.RttCapabilities |
getRttCapabilities() |
void |
startRanging(RttManager.RttParams[] params,
RttManager.RttListener listener)
Request to start an RTT ranging
|
void |
stopRanging(RttManager.RttListener listener) |
@Deprecated public static final int RTT_TYPE_UNSPECIFIED
public static final int RTT_TYPE_ONE_SIDED
public static final int RTT_TYPE_TWO_SIDED
@Deprecated public static final int RTT_TYPE_11_V
@Deprecated public static final int RTT_TYPE_11_MC
@Deprecated public static final int RTT_PEER_TYPE_UNSPECIFIED
public static final int RTT_PEER_TYPE_AP
public static final int RTT_PEER_TYPE_STA
public static final int RTT_PEER_P2P_GO
public static final int RTT_PEER_P2P_CLIENT
public static final int RTT_PEER_NAN
@Deprecated public static final int RTT_CHANNEL_WIDTH_20
RTT_BW_20_SUPPORT
API.@Deprecated public static final int RTT_CHANNEL_WIDTH_40
RTT_BW_40_SUPPORT
API.@Deprecated public static final int RTT_CHANNEL_WIDTH_80
RTT_BW_80_SUPPORT
API.@Deprecated public static final int RTT_CHANNEL_WIDTH_160
RTT_BW_160_SUPPORT
API.@Deprecated public static final int RTT_CHANNEL_WIDTH_80P80
@Deprecated public static final int RTT_CHANNEL_WIDTH_5
RTT_BW_5_SUPPORT
API.@Deprecated public static final int RTT_CHANNEL_WIDTH_10
RTT_BW_10_SUPPORT
API.@Deprecated public static final int RTT_CHANNEL_WIDTH_UNSPECIFIED
public static final int RTT_STATUS_SUCCESS
public static final int RTT_STATUS_FAILURE
public static final int RTT_STATUS_FAIL_NO_RSP
public static final int RTT_STATUS_FAIL_REJECTED
public static final int RTT_STATUS_FAIL_NOT_SCHEDULED_YET
public static final int RTT_STATUS_FAIL_TM_TIMEOUT
public static final int RTT_STATUS_FAIL_AP_ON_DIFF_CHANNEL
public static final int RTT_STATUS_FAIL_NO_CAPABILITY
public static final int RTT_STATUS_ABORTED
public static final int RTT_STATUS_FAIL_INVALID_TS
public static final int RTT_STATUS_FAIL_PROTOCOL
public static final int RTT_STATUS_FAIL_SCHEDULE
public static final int RTT_STATUS_FAIL_BUSY_TRY_LATER
public static final int RTT_STATUS_INVALID_REQ
public static final int RTT_STATUS_NO_WIFI
public static final int RTT_STATUS_FAIL_FTM_PARAM_OVERRIDE
public static final int REASON_UNSPECIFIED
public static final int REASON_NOT_AVAILABLE
public static final int REASON_INVALID_LISTENER
public static final int REASON_INVALID_REQUEST
public static final int REASON_PERMISSION_DENIED
public static final int REASON_INITIATOR_NOT_ALLOWED_WHEN_RESPONDER_ON
public static final String DESCRIPTION_KEY
public static final int RTT_BW_5_SUPPORT
public static final int RTT_BW_10_SUPPORT
public static final int RTT_BW_20_SUPPORT
public static final int RTT_BW_40_SUPPORT
public static final int RTT_BW_80_SUPPORT
public static final int RTT_BW_160_SUPPORT
public static final int PREAMBLE_LEGACY
public static final int PREAMBLE_HT
public static final int PREAMBLE_VHT
public static final int BASE
public static final int CMD_OP_START_RANGING
public static final int CMD_OP_STOP_RANGING
public static final int CMD_OP_FAILED
public static final int CMD_OP_SUCCEEDED
public static final int CMD_OP_ABORTED
public static final int CMD_OP_ENABLE_RESPONDER
public static final int CMD_OP_DISABLE_RESPONDER
public static final int CMD_OP_ENALBE_RESPONDER_SUCCEEDED
public static final int CMD_OP_ENALBE_RESPONDER_FAILED
public RttManager(Context context, IRttManager service, Looper looper)
Context.getSystemService()
to retrieve
the standard Context.WIFI_RTT_SERVICE
.context
- the application contextservice
- the Binder interfacelooper
- Looper for running the callbacks.@Deprecated public RttManager.Capabilities getCapabilities()
getRttCapabilities()
API.public RttManager.RttCapabilities getRttCapabilities()
public void startRanging(RttManager.RttParams[] params, RttManager.RttListener listener)
params
- -- RTT request Parameterslistener
- -- Call back to inform RTT resultthrow
- IllegalArgumentException when params are illegal
throw IllegalStateException when RttCapabilities do not existpublic void stopRanging(RttManager.RttListener listener)
public void enableResponder(RttManager.ResponderCallback callback)
callback
.
Note calling this method with the same callback when the responder is already enabled won't
change the responder state, a cached RttManager.ResponderConfig
from the last enabling will be
returned through the callback.
callback
- Callback for responder enabling/disabling result.IllegalArgumentException
- If callback
is null.public void disableResponder(RttManager.ResponderCallback callback)
callback
needs to be the
same one used in enableResponder(ResponderCallback)
.
Calling this method when responder isn't enabled won't have any effect. The callback can be reused for enabling responder after this method is called.
callback
- The same callback used for enabling responder.IllegalArgumentException
- If callback
is null.