public final class PhyRequest extends SimpleValueRequest<PhyCallback> implements Operation
| Modifier and Type | Field and Description |
|---|---|
static int |
PHY_LE_1M_MASK
Bluetooth LE 1M PHY mask.
|
static int |
PHY_LE_2M_MASK
Bluetooth LE 2M PHY mask.
|
static int |
PHY_LE_CODED_MASK
Bluetooth LE Coded PHY mask.
|
static int |
PHY_OPTION_NO_PREFERRED
No preferred coding when transmitting on the LE Coded PHY.
|
static int |
PHY_OPTION_S2
Prefer the S=2 coding to be used when transmitting on the LE Coded PHY.
|
static int |
PHY_OPTION_S8
Prefer the S=8 coding to be used when transmitting on the LE Coded PHY.
|
handler, requestHandler| Modifier and Type | Method and Description |
|---|---|
PhyRequest |
before(BeforeCallback callback)
Sets a callback that will be executed before the execution of this operation starts.
|
PhyRequest |
done(SuccessCallback callback)
Use to set a completion callback.
|
PhyRequest |
fail(FailCallback callback)
Use to set a callback that will be called in case the request has failed.
|
PhyRequest |
invalid(InvalidRequestCallback callback)
Use to set a callback that will be called in case the request was invalid, for example
called before the device was connected.
|
PhyRequest |
setHandler(android.os.Handler handler)
Sets the handler that will be used to invoke callbacks.
|
PhyRequest |
with(PhyCallback callback)
Sets the value callback.
|
await, awaitawaitcreateBond, enqueue, newConnectionPriorityRequest, newDisableBatteryLevelNotificationsRequest, newDisableIndicationsRequest, newDisableNotificationsRequest, newEnableBatteryLevelNotificationsRequest, newEnableIndicationsRequest, newEnableNotificationsRequest, newMtuRequest, newReadBatteryLevelRequest, newReadPhyRequest, newReadRequest, newReadRequest, newReadRssiRequest, newRefreshCacheRequest, newSetPreferredPhyRequest, newSleepRequest, newWaitForIndicationRequest, newWaitForNotificationRequest, newWriteRequest, newWriteRequest, newWriteRequest, newWriteRequest, newWriteRequest, newWriteRequest, removeBondpublic static final int PHY_LE_1M_MASK
public static final int PHY_LE_2M_MASK
public static final int PHY_LE_CODED_MASK
public static final int PHY_OPTION_NO_PREFERRED
public static final int PHY_OPTION_S2
public static final int PHY_OPTION_S8
@NonNull public PhyRequest setHandler(@NonNull android.os.Handler handler)
RequestBleManager will be used.setHandler in class Requesthandler - The handler to invoke callbacks for this request.@NonNull public PhyRequest done(@NonNull SuccessCallback callback)
Request@NonNull public PhyRequest fail(@NonNull FailCallback callback)
RequestBleManager.connect(BluetoothDevice) was never called), the
Request.invalid(InvalidRequestCallback) will be used instead, as the
BluetoothDevice is not known.
This callback will be ignored if request was executed synchronously, in which case the error will be returned as an exception.
@NonNull public PhyRequest invalid(@NonNull InvalidRequestCallback callback)
Request@NonNull public PhyRequest before(@NonNull BeforeCallback callback)
Request@NonNull public PhyRequest with(@NonNull PhyCallback callback)
SimpleValueRequestawait(...) method;with in class SimpleValueRequest<PhyCallback>callback - the callback.