Example usage for android.bluetooth BluetoothDevice connectGatt

List of usage examples for android.bluetooth BluetoothDevice connectGatt

Introduction

In this page you can find the example usage for android.bluetooth BluetoothDevice connectGatt.

Prototype

public BluetoothGatt connectGatt(Context context, boolean autoConnect, BluetoothGattCallback callback,
        int transport) 

Source Link

Document

Connect to GATT Server hosted by this device.

Usage

From source file:Main.java

public static BluetoothGatt connect(BluetoothDevice device, Context context, BluetoothGattCallback callback) {
    return device.connectGatt(context, false, callback, BluetoothDevice.TRANSPORT_LE);
}