Java Code Examples for android.bluetooth.BluetoothGatt#abortReliableWrite()

The following examples show how to use android.bluetooth.BluetoothGatt#abortReliableWrite() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BleManagerHandler.java    From Android-BLE-Library with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private boolean internalAbortReliableWrite() {
	final BluetoothGatt gatt = bluetoothGatt;
	if (gatt == null || !connected)
		return false;

	if (!reliableWriteInProgress)
		return false;

	log(Log.VERBOSE, "Aborting reliable write...");
	if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
		log(Log.DEBUG, "gatt.abortReliableWrite()");
		gatt.abortReliableWrite();
	} else {
		log(Log.DEBUG, "gatt.abortReliableWrite(device)");
		gatt.abortReliableWrite(gatt.getDevice());
	}
	return true;
}
 
Example 2
Source File: K_Util.java    From AsteroidOSSync with GNU General Public License v3.0 4 votes vote down vote up
public static void abortReliableWrite(BluetoothGatt gatt)
{
    gatt.abortReliableWrite();
}
 
Example 3
Source File: K_Util.java    From SweetBlue with GNU General Public License v3.0 4 votes vote down vote up
public static void abortReliableWrite(BluetoothGatt gatt)
{
    gatt.abortReliableWrite();
}