Package 

Class SetValueRequest

    • Method Summary

      Modifier and Type Method Description
      SetValueRequest setHandler(@Nullable() Handler handler) Sets the handler that will be used to invoke callbacks.
      SetValueRequest done(@NonNull() SuccessCallback callback) Use to set a completion callback.
      SetValueRequest fail(@NonNull() FailCallback callback) Use to set a callback that will be called in case the request has failed.
      SetValueRequest invalid(@NonNull() InvalidRequestCallback callback) Use to set a callback that will be called in case the request was invalid, for examplecalled before the device was connected.This callback will be ignored if request was executed synchronously, in which casethe error will be returned as an exception.
      SetValueRequest before(@NonNull() BeforeCallback callback) Sets a callback that will be executed before the execution of this operation starts.
      SetValueRequest then(@NonNull() AfterCallback callback) Sets a callback that will be executed when the request has been processed, no matterthe request result.
      SetValueRequest allowLongRead(boolean longReadSupported) Sets whether Long Read procedure is supported by the remote device on the given characteristicor descriptor.
      • Methods inherited from class no.nordicsemi.android.ble.SimpleRequest

        await
      • Methods inherited from class no.nordicsemi.android.ble.Request

        before, createBond, done, enqueue, fail, invalid, newConnectionPriorityRequest, newDisableBatteryLevelNotificationsRequest, newDisableIndicationsRequest, newDisableNotificationsRequest, newEnableBatteryLevelNotificationsRequest, newEnableIndicationsRequest, newEnableNotificationsRequest, newMtuRequest, newReadBatteryLevelRequest, newReadPhyRequest, newReadRequest, newReadRequest, newReadRssiRequest, newRefreshCacheRequest, newSetPreferredPhyRequest, newSleepRequest, newWaitForIndicationRequest, newWaitForNotificationRequest, newWriteRequest, newWriteRequest, newWriteRequest, newWriteRequest, newWriteRequest, newWriteRequest, removeBond, setHandler, then
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setHandler

        @NonNull() SetValueRequest setHandler(@Nullable() Handler handler)

        Sets the handler that will be used to invoke callbacks. By default, the handler set in BleManager will be used.

        If set to null, the callbacks will be invoked immediately on the BLE looper.

        Parameters:
        handler - The handler to invoke callbacks for this request.
      • done

        @NonNull() SetValueRequest done(@NonNull() SuccessCallback callback)

        Use to set a completion callback. The callback will be invoked when the operation hasfinished successfully unless the request was executed synchronously, in which case thiscallback will be ignored.

        Parameters:
        callback - the callback.
      • fail

        @NonNull() SetValueRequest fail(@NonNull() FailCallback callback)

        Use to set a callback that will be called in case the request has failed.If the target device wasn't set before executing this request(connect was never called), the invalid will be used instead, as the BluetoothDevice is not known.

        This callback will be ignored if request was executed synchronously, in which casethe error will be returned as an exception.

        Parameters:
        callback - the callback.
      • invalid

        @NonNull() SetValueRequest invalid(@NonNull() InvalidRequestCallback callback)

        Use to set a callback that will be called in case the request was invalid, for examplecalled before the device was connected.This callback will be ignored if request was executed synchronously, in which casethe error will be returned as an exception.

        Parameters:
        callback - the callback.
      • allowLongRead

        @NonNull() SetValueRequest allowLongRead(boolean longReadSupported)

        Sets whether Long Read procedure is supported by the remote device on the given characteristicor descriptor. If set to false, the given data will be truncated to match MTU.Otherwise (default) will only be truncated to fit in the maximum Long Read length, that is512 bytes.

        Parameters:
        longReadSupported - whether Long Read procedure is supported on the remote device onthe given characteristic or descriptor.