|
@@ -129,8 +129,7 @@ public class MeasureMainActivity extends BleStateActivity implements ResultListe
|
|
|
@Override
|
|
|
protected void init() {
|
|
|
initViews();
|
|
|
- initTab();
|
|
|
-
|
|
|
+ // initTab();
|
|
|
|
|
|
getToken();
|
|
|
|
|
@@ -138,13 +137,16 @@ public class MeasureMainActivity extends BleStateActivity implements ResultListe
|
|
|
setDeviceStatusListener();
|
|
|
|
|
|
resetToMeasure();
|
|
|
+
|
|
|
+ connect_mode = CONNECT_MODE_BLE;
|
|
|
+ doConnect();
|
|
|
}
|
|
|
|
|
|
|
|
|
private void initViews() {
|
|
|
ivBack = findViewById(R.id.iv_back);
|
|
|
- mTl = findViewById(R.id.tl);
|
|
|
- mVp = findViewById(R.id.vp);
|
|
|
+// mTl = findViewById(R.id.tl);
|
|
|
+// mVp = findViewById(R.id.vp);
|
|
|
mIvDevice = findViewById(R.id.iv_device);
|
|
|
mTvOtg = findViewById(R.id.tv_otg);
|
|
|
mTvScan = findViewById(R.id.tv_scan);
|
|
@@ -494,7 +496,7 @@ public class MeasureMainActivity extends BleStateActivity implements ResultListe
|
|
|
});
|
|
|
|
|
|
|
|
|
- setDialogData(mDeviceSAdapter, -1, new DialogTipsUtil.DeviceSelectCallback() {
|
|
|
+ setDialogData(mDeviceSAdapter, 0, new DialogTipsUtil.DeviceSelectCallback() {
|
|
|
@Override
|
|
|
public void onSuccess(BleDevice bleDevice) {
|
|
|
BleManager.getInstance().cancelScan();
|