添加开锁数据部分上报
This commit is contained in:
parent
e80d27ff17
commit
4bfb11e1d1
@ -2,6 +2,7 @@ import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:flutter_bugly_plugin/flutter_bugly_plugin.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
@ -304,6 +305,7 @@ class BlueManage {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
FlutterBuglyPlugin.reportException(exceptionName: 'blueSendData isAvailable状态', reason: 'blueSendData isAvailable不可用');
|
||||
AppLog.log('开始扫描 蓝牙不可用,不能进行蓝牙操作');
|
||||
}
|
||||
});
|
||||
|
||||
@ -2,6 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:flutter_bugly_plugin/flutter_bugly_plugin.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
@ -333,11 +334,11 @@ class LockDetailLogic extends BaseGetXController {
|
||||
showBlueConnetctToastTimer(
|
||||
outTimer: 20,
|
||||
action: () {
|
||||
FlutterBuglyPlugin.reportException(exceptionName: '开门超时处理', reason: '开门超时,断开连接');
|
||||
resetOpenDoorState();
|
||||
blueManageDisconnect();
|
||||
});
|
||||
final List<String>? privateKey =
|
||||
await Storage.getStringList(saveBluePrivateKey);
|
||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
|
||||
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
@ -350,6 +351,7 @@ class LockDetailLogic extends BaseGetXController {
|
||||
.blueSendData(state.keyInfos.value.bluetooth!.bluetoothDeviceName!,
|
||||
(BluetoothConnectionState deviceConnectionState) async {
|
||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||
FlutterBuglyPlugin.reportException(exceptionName: '蓝牙连接成功', reason: '蓝牙连接成功,发送开锁指令');
|
||||
IoSenderManage.senderOpenLock(
|
||||
lockID: BlueManage().connectDeviceName,
|
||||
userID: await Storage.getUid(),
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bugly_plugin/flutter_bugly_plugin.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -1427,11 +1428,13 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
if (isOpenLockNeedOnline) {
|
||||
// 不需要联网
|
||||
state.openDoorModel = 0;
|
||||
FlutterBuglyPlugin.reportException(exceptionName: '点击了不需要联网开锁');
|
||||
AppLog.log('点击开锁 state.openDoorModel = 0 不需要联网');
|
||||
logic.openDoorAction();
|
||||
} else {
|
||||
// 需要联网
|
||||
state.openDoorModel = 2;
|
||||
FlutterBuglyPlugin.reportException(exceptionName: '点击了需要联网开锁');
|
||||
AppLog.log('点击开锁 state.openDoorModel = 2 需要联网');
|
||||
logic.getLockNetToken();
|
||||
}
|
||||
|
||||
@ -17,14 +17,14 @@ class BuglyTool {
|
||||
if (F.isProductionEnv) {
|
||||
//生产
|
||||
await FlutterBuglyPlugin.init(
|
||||
appIdAndroid: '73c99cca00',
|
||||
appIdiOS: 'b25632a54f',
|
||||
appIdAndroid: '5729fb97dc',
|
||||
appIdiOS: '33c4430cce',
|
||||
);
|
||||
} else {
|
||||
//测试
|
||||
await FlutterBuglyPlugin.init(
|
||||
appIdAndroid: '02fb541c1c',
|
||||
appIdiOS: '618ab9feeb',
|
||||
appIdAndroid: '5729fb97dc',
|
||||
appIdiOS: '33c4430cce',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user