Package 

Class ConnectionPriorityResponse

    • Method Summary

      Modifier and Type Method Description
      int getSupervisionTimeout() This timeout determines the timeout from the last data exchange till a link is considered lost.A Central will not start trying to reconnect before the timeout has passed,so if you have a device which goes in and out of range often, and you need to notice whenthat happens, it might make sense to have a short timeout.
      void onConnectionUpdated(@NonNull() BluetoothDevice device, @IntRange(from = 6, to = 3200) int interval, @IntRange(from = 0, to = 499) int latency, @IntRange(from = 10, to = 3200) int timeout) Callback indicating the connection parameters were updated.
      BluetoothDevice getBluetoothDevice()
      int getConnectionInterval() The connection interval determines how often the Central will ask for data from the Peripheral.When the Peripheral requests an update, it supplies a maximum and a minimum wanted interval.The connection interval must be between 7.5 ms and 4 s.
      int getSlaveLatency() By setting a non-zero slave latency, the Peripheral can choose to not answer whenthe Central asks for data up to the slave latency number of times.However, if the Peripheral has data to send, it can choose to send data at any time.This enables a peripheral to stay sleeping for a longer time, if it doesn't have data to send,but still send data fast if needed.
      void writeToParcel(Parcel dest, int flags)
      int describeContents()
      • Methods inherited from class no.nordicsemi.android.ble.callback.ConnectionParametersUpdatedCallback

        onConnectionUpdated
      • Methods inherited from class android.os.Parcelable

        describeContents, writeToParcel
      • Methods inherited from class java.lang.Object

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

      • ConnectionPriorityResponse

        ConnectionPriorityResponse()
    • Method Detail

      • getSupervisionTimeout

        @IntRange(from = 10, to = 3200) int getSupervisionTimeout()

        This timeout determines the timeout from the last data exchange till a link is considered lost.A Central will not start trying to reconnect before the timeout has passed,so if you have a device which goes in and out of range often, and you need to notice whenthat happens, it might make sense to have a short timeout.

      • onConnectionUpdated

         void onConnectionUpdated(@NonNull() BluetoothDevice device, @IntRange(from = 6, to = 3200) int interval, @IntRange(from = 0, to = 499) int latency, @IntRange(from = 10, to = 3200) int timeout)

        Callback indicating the connection parameters were updated. Works on Android 8.0 Oreo or newer.

        Parameters:
        device - the target device.
        interval - Connection interval used on this connection, 1.25ms unit.
        latency - Slave latency for the connection in number of connection events.
        timeout - Supervision timeout for this connection, in 10ms unit.
      • getConnectionInterval

        @IntRange(from = 6, to = 3200) int getConnectionInterval()

        The connection interval determines how often the Central will ask for data from the Peripheral.When the Peripheral requests an update, it supplies a maximum and a minimum wanted interval.The connection interval must be between 7.5 ms and 4 s.

      • getSlaveLatency

        @IntRange(from = 0, to = 499) int getSlaveLatency()

        By setting a non-zero slave latency, the Peripheral can choose to not answer whenthe Central asks for data up to the slave latency number of times.However, if the Peripheral has data to send, it can choose to send data at any time.This enables a peripheral to stay sleeping for a longer time, if it doesn't have data to send,but still send data fast if needed. The text book example of such device is for examplekeyboard and mice, which want to be sleeping for as long as possible when there isno data to send, but still have low latency (and for the mouse: low connection interval)when needed.