Example usage for android.bluetooth BluetoothGatt beginReliableWrite

List of usage examples for android.bluetooth BluetoothGatt beginReliableWrite

Introduction

In this page you can find the example usage for android.bluetooth BluetoothGatt beginReliableWrite.

Prototype

public boolean beginReliableWrite() 

Source Link

Document

Initiates a reliable write transaction for a given remote device.

Usage

From source file:com.google.android.apps.forscience.ble.MyBleService.java

public void startTransaction(String address) {
    BluetoothGatt bluetoothGatt = addressToGattClient.get(address);
    if (bluetoothGatt == null) {
        Log.w(TAG, "No connection found for: " + address);
        return;/*w w w  . j  ava 2  s . com*/
    }
    sendGattBroadcast(address,
            (bluetoothGatt.beginReliableWrite() ? BleEvents.START_TX_OK : BleEvents.START_TX_FAIL), null);
}