01.Client 知识点

BLE 回调函数 BluetoothGattCallback

01.onCharacteristicChanged

(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic)

Callback triggered as a result of a remote characteristic notification.

02 .onCharacteristicRead

(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status)

*Callback reporting the result of a characteristic read operation.

03 onCharacteristicWrite

(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status)

*Callback indicating the result of a characteristic write operation.

04 onConnectionStateChange

(BluetoothGatt gatt, int status, int newState)

  • Callback indicating when GATT client has connected/disconnected to/from a remote GATT server.

05 onDescriptorRead

(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status)

*Callback reporting the result of a descriptor read operation

06 onDescriptorWrite

(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status)

*Callback indicating the result of a descriptor write operation.

07 onServicesDiscovered

(BluetoothGatt gatt, int status)

  • Callback invoked when the list of remote services, characteristics and descriptors for the remote device have been updated, ie new services have been discovered.

results matching ""

    No results matching ""