Android examples for Bluetooth:Bluetooth State
change BluetoothGatt
//package com.java2s; import android.bluetooth.BluetoothGatt; public class Main { public static boolean changeGattMtu(BluetoothGatt gatt, int mtu) { int retry = 5; boolean ok = false; while (!ok && retry > 0) { ok = gatt.requestMtu(mtu);/* w ww. ja v a 2 s.c o m*/ retry--; } return ok; } }