Package 

Class AwaitingRequest

    • Method Summary

      Modifier and Type Method Description
      AwaitingRequest<T> trigger(@NonNull() Operation trigger) Sets an optional request that is suppose to trigger the notification or indication.This is to ensure that the characteristic value won't change before the callback was set.
      <E extends T> E await(@NonNull() E response) Synchronously waits until the request is done.
      • Methods inherited from class no.nordicsemi.android.ble.TimeoutableValueRequest

        await, await, await, timeout, with
      • Methods inherited from class no.nordicsemi.android.ble.TimeoutableRequest

        await, await, cancel, enqueue, enqueue, isCancelled, setHandler, timeout
      • Methods inherited from class no.nordicsemi.android.ble.Request

        before, createBond, done, 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

      • trigger

        @NonNull() AwaitingRequest<T> trigger(@NonNull() Operation trigger)

        Sets an optional request that is suppose to trigger the notification or indication.This is to ensure that the characteristic value won't change before the callback was set.

        Parameters:
        trigger - the operation that triggers the notification, usually a write characteristicrequest that write some OP CODE.
      • await

        @NonNull() <E extends T> E await(@NonNull() E response)

        Synchronously waits until the request is done.

        When the timeout, set with timeout occurs, the InterruptedException will be thrown.

        Callbacks set using done and fail and with will be ignored.

        This method may not be called from the main (UI) thread.

        Parameters:
        response - the response object.