From 17d97f58265510ceda0b38959a90424ee07b6910 Mon Sep 17 00:00:00 2001
From: 陈奇 <1650699704@qq.com>
Date: Tue, 13 Nov 2018 11:42:07 +0800
Subject: [PATCH] 1.0.3-1测试版本 [*]修改重新连接的方式 [*]修改商城连接 [*]修改心跳机制 [*]主要针对oppo和vivo机型添加开启定位服务

---
 FastBleLib/src/main/java/com/clj/fastble/bluetooth/BleBluetooth.java |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/FastBleLib/src/main/java/com/clj/fastble/bluetooth/BleBluetooth.java b/FastBleLib/src/main/java/com/clj/fastble/bluetooth/BleBluetooth.java
index 047d288..a0abb9a 100644
--- a/FastBleLib/src/main/java/com/clj/fastble/bluetooth/BleBluetooth.java
+++ b/FastBleLib/src/main/java/com/clj/fastble/bluetooth/BleBluetooth.java
@@ -348,7 +348,6 @@
         @Override
         public void onConnecting(BluetoothGatt gatt, int status) {
             BleLog.i("BleGattCallback���onConnectSuccess ");
-
             bluetoothGatt = gatt;
             Iterator iterator = callbackHashMap.entrySet().iterator();
             while (iterator.hasNext()) {
@@ -403,7 +402,6 @@
                     + '\n' + "status: " + status
                     + '\n' + "newState: " + newState
                     + '\n' + "currentThread: " + Thread.currentThread().getId());
-
             if (newState == BluetoothGatt.STATE_CONNECTED) {
                 connectionState = STATE_CONNECTED;
                 onConnectSuccess(gatt, status);
@@ -437,6 +435,7 @@
                 Map.Entry entry = (Map.Entry) iterator.next();
                 Object call = entry.getValue();
                 if (call instanceof BluetoothGattCallback) {
+                    gatt.requestMtu(64);
                     ((BluetoothGattCallback) call).onServicesDiscovered(gatt, status);
                 }
             }
@@ -459,7 +458,6 @@
         @Override
         public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
             BleLog.i("BleGattCallback���onCharacteristicWrite ");
-
             Iterator iterator = callbackHashMap.entrySet().iterator();
             while (iterator.hasNext()) {
                 Map.Entry entry = (Map.Entry) iterator.next();
@@ -473,7 +471,6 @@
         @Override
         public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
             BleLog.i("BleGattCallback���onCharacteristicChanged ");
-
             Iterator iterator = callbackHashMap.entrySet().iterator();
             while (iterator.hasNext()) {
                 Map.Entry entry = (Map.Entry) iterator.next();

--
Gitblit v1.8.0