1.0.3-1测试版本
[*]修改重新连接的方式
[*]修改商城连接
[*]修改心跳机制
[*]主要针对oppo和vivo机型添加开启定位服务
17 files modified
22 ■■■■■ changed files
.gradle/4.1/fileHashes/fileHashes.bin patch | view | raw | blame | history
.gradle/4.1/fileHashes/fileHashes.lock patch | view | raw | blame | history
.gradle/4.1/fileHashes/resourceHashesCache.bin patch | view | raw | blame | history
.gradle/4.1/javaCompile/classAnalysis.bin patch | view | raw | blame | history
.gradle/4.1/javaCompile/jarAnalysis.bin patch | view | raw | blame | history
.gradle/4.1/javaCompile/javaCompile.lock patch | view | raw | blame | history
.gradle/4.1/javaCompile/taskHistory.bin patch | view | raw | blame | history
.gradle/4.1/javaCompile/taskJars.bin patch | view | raw | blame | history
.gradle/4.1/taskHistory/fileSnapshots.bin patch | view | raw | blame | history
.gradle/4.1/taskHistory/taskHistory.bin patch | view | raw | blame | history
.gradle/4.1/taskHistory/taskHistory.lock patch | view | raw | blame | history
FastBleLib/src/main/java/com/clj/fastble/bluetooth/BleBluetooth.java 2 ●●● patch | view | raw | blame | history
FastBleLib/src/main/java/com/clj/fastble/conn/BleConnector.java 1 ●●●● patch | view | raw | blame | history
app/build.gradle 4 ●●●● patch | view | raw | blame | history
app/src/main/java/com/moral/yunfushao/MainActivity.java 1 ●●●● patch | view | raw | blame | history
app/src/main/java/com/moral/yunfushao/fragment/FragmentMonitor.java 12 ●●●● patch | view | raw | blame | history
conf.gradle 2 ●●● patch | view | raw | blame | history
.gradle/4.1/fileHashes/fileHashes.bin
Binary files differ
.gradle/4.1/fileHashes/fileHashes.lock
Binary files differ
.gradle/4.1/fileHashes/resourceHashesCache.bin
Binary files differ
.gradle/4.1/javaCompile/classAnalysis.bin
Binary files differ
.gradle/4.1/javaCompile/jarAnalysis.bin
Binary files differ
.gradle/4.1/javaCompile/javaCompile.lock
Binary files differ
.gradle/4.1/javaCompile/taskHistory.bin
Binary files differ
.gradle/4.1/javaCompile/taskJars.bin
Binary files differ
.gradle/4.1/taskHistory/fileSnapshots.bin
Binary files differ
.gradle/4.1/taskHistory/taskHistory.bin
Binary files differ
.gradle/4.1/taskHistory/taskHistory.lock
Binary files differ
FastBleLib/src/main/java/com/clj/fastble/bluetooth/BleBluetooth.java
@@ -435,7 +435,6 @@
                Map.Entry entry = (Map.Entry) iterator.next();
                Object call = entry.getValue();
                if (call instanceof BluetoothGattCallback) {
                    gatt.requestMtu(64);
                    ((BluetoothGattCallback) call).onServicesDiscovered(gatt, status);
                }
            }
@@ -476,6 +475,7 @@
                Map.Entry entry = (Map.Entry) iterator.next();
                Object call = entry.getValue();
                if (call instanceof BluetoothGattCallback) {
                    gatt.requestMtu(64);
                    ((BluetoothGattCallback) call).onCharacteristicChanged(gatt, characteristic);
                }
            }
FastBleLib/src/main/java/com/clj/fastble/conn/BleConnector.java
@@ -351,6 +351,7 @@
                    if (!msgRemoved.getAndSet(true)) {
                        handler.removeMessages(MSG_NOTIFY_CHA, this);
                    }
                    if (characteristic.getUuid().equals(UUID.fromString(uuid_notify))) {
                        System.out.println("chenqi Hex ->" + dumpHex(characteristic.getValue()));
                        bleCallback.onSuccess(characteristic);
app/build.gradle
@@ -35,11 +35,11 @@
        }
    }
    //自定义名字
    //3.0版本
    //6.0版本
    android.applicationVariants.all { variant ->
        variant.outputs.all {
            if (buildType.name == "debug")
                outputFileName = "Dev_yfs_v.${variant.versionName}.apk"
                outputFileName = "Dev_yfs_v.${variant.versionName}${rootProject.ext.android.debugVersion}.apk"
            else outputFileName = "yfs_v.${variant.versionName}.apk"
        }
    }
app/src/main/java/com/moral/yunfushao/MainActivity.java
@@ -352,7 +352,6 @@
        @Override
        public void onConnecting() {
            System.out.println("MainActivity onConnecting");
            progressDialog.setTitleText("正在连接...");
            progressDialog.show();
        }
app/src/main/java/com/moral/yunfushao/fragment/FragmentMonitor.java
@@ -55,7 +55,6 @@
import com.moral.yunfushao.ui.PanelView;
import com.moral.yunfushao.utils.AudioUtils;
import com.moral.yunfushao.utils.DebugUtils;
import com.moral.yunfushao.utils.T;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
@@ -136,7 +135,6 @@
    private Runnable reconnectRunnable = new Runnable() {
        @Override
        public void run() {
            System.out.println("chenqi 立刻重连");
            //重连
            if (mBluetoothService == null) {
                return;
@@ -259,7 +257,7 @@
                            }
                        });
                //重置handler
                resetHandler();
                HEARTTIMES = 2;
                //发送心跳
                heart();
            }
@@ -348,15 +346,13 @@
    public void onResume() {
        super.onResume();
        isMySelfPage = true;
        reconnect();
        textShowMac();
    }
    @Override
    public void onPause() {
        super.onPause();
        //暂停的时候不检测
        T.show("onPause");
        System.out.println("chenqi onPause");
        isMySelfPage = false;
        stopReconnect();
    }
@@ -364,6 +360,7 @@
    @Override
    public void onDestroy() {
        super.onDestroy();
        System.out.println("chenqi onDestroy");
        EventBus.getDefault().unregister(this);
        if (timer != null) {
            timer.cancel();
@@ -526,14 +523,11 @@
            handler.postDelayed(reconnectRunnable, 0);
        }
    }
    /**
     * 停止重连
     */
    private void stopReconnect() {
        handler.removeCallbacks(reconnectRunnable);
        if (mBluetoothService != null)
            mBluetoothService.closeConnect();
    }
    private void resetHandler() {
conf.gradle
@@ -6,7 +6,7 @@
            versionName      : "1.0.3.1",
            minSdkVersion    : 21,
            targetSdkVersion : 25,
            debugVersion     : "sp1",
            debugVersion     : "_sp1",
    ]
    dependencies = [