您的位置:首页 > 产品设计 > UI/UE

Android蓝牙4.0API-类-BluetoothGattCallback

2016-04-28 11:02 375 查看
This abstract class is used to implement 
BluetoothGatt
 callbacks.

公有的方法

void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic)

Callback
triggered引起 as a result of a remote characteristic notification.

void

onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic,
int status)

Callback
reporting the result of a characteristic read operation.

void

onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic,
int status)

Callback
indicating the result of a characteristic write operation.

void

onConnectionStateChange(BluetoothGatt gatt,
int status, int newState)

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

void

onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor,
int status)

Callback
reporting the result of a descriptor read operation.

void

onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor,
int status)

Callback
indicating the result of a descriptor write operation

void

onMtuChanged(BluetoothGatt gatt,
int mtu, int status)

Callback
indicating the MTU for a given device connection has changed.

void

onReadRemoteRssi(BluetoothGatt gatt,
int rssi, int status)

Callback
reporting the RSSI for a remote device connection

void

onReliableWriteCompleted(BluetoothGatt gatt,
int status)

Callback
invoked when a reliable write transaction has been completed.

void

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: