Example usage for android.bluetooth BluetoothGattCharacteristic getInstanceId

List of usage examples for android.bluetooth BluetoothGattCharacteristic getInstanceId

Introduction

In this page you can find the example usage for android.bluetooth BluetoothGattCharacteristic getInstanceId.

Prototype

public int getInstanceId() 

Source Link

Document

Returns the instance ID for this characteristic.

Usage

From source file:com.megster.cordova.ble.central.Peripheral.java

private String generateHashKey(UUID serviceUUID, BluetoothGattCharacteristic characteristic) {
    return String.valueOf(serviceUUID) + "|" + characteristic.getUuid() + "|" + characteristic.getInstanceId();
}

From source file:com.cypress.cysmart.RDKEmulatorView.RemoteControlEmulatorFragment.java

/**
 * Method to get all Characteristic with report reference
 *//*from ww w .ja  v  a 2s .  c  o m*/
private void getAllCharacteristicReportReference() {
    List<BluetoothGattCharacteristic> gattCharacteristics = mservice.getCharacteristics();
    charaDataModel.clear();
    for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) {
        String uuidchara = gattCharacteristic.getUuid().toString();
        if (uuidchara.equalsIgnoreCase(GattAttributes.REP0RT)) {
            ReportCharacteristicDescriptionModel data = new ReportCharacteristicDescriptionModel(
                    gattCharacteristic, gattCharacteristic.getInstanceId());
            charaDataModel.add(data);
        }
    }
    prepareBroadcastAllNotifications();

}