diff --git a/android/app/build.gradle b/android/app/build.gradle index 1d9aea6d..baeb56c7 100755 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -304,6 +304,6 @@ dependencies { implementation 'cn.jiguang.sdk.plugin:vivo:5.2.3' // Umeng统计 - implementation 'com.umeng.umsdk:common:9.3.7' - implementation 'com.umeng.umsdk:asms:1.4.1' + implementation 'com.umeng.umsdk:common:9.7.9' + implementation 'com.umeng.umsdk:asms:1.8.5' } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 9e6d6868..5bc305cb 100755 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="com.skychip.lock"> - - @@ -58,14 +56,8 @@ - - - - - - NSFileProtectionKey NSFileProtectionCompleteUntilFirstUserAuthentication NSLocationAlwaysAndWhenInUseUsageDescription - 应用在前台和后台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationAlwaysUsageDescription - 应用在后台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationWhenInUseUsageDescription - 应用在前台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSMicrophoneUsageDescription 应用请求麦克风用来通话 NSPhotoLibraryUsageDescription diff --git a/ios/Runner/en.lproj/InfoPlist_sky.strings b/ios/Runner/en.lproj/InfoPlist_sky.strings index f735249c..8002da87 100644 --- a/ios/Runner/en.lproj/InfoPlist_sky.strings +++ b/ios/Runner/en.lproj/InfoPlist_sky.strings @@ -11,8 +11,8 @@ NSBluetoothAlwaysUsageDescription="The app uses bluetooth to find, connect and t NSBluetoothPeripheralUsageDescription="The app uses bluetooth to find, connect and transfer data between different devices"; NSCameraUsageDescription="The application requests the camera to take photos for avatar upload and face authentication"; NSContactsUsageDescription="Access the address book to send electronic keys to contacts in the address book"; -NSLocationAlwaysAndWhenInUseUsageDescription="updated location information when applying in the front and backend"; -NSLocationAlwaysUsageDescription="updated location information when the app is in the background"; -NSLocationWhenInUseUsageDescription="updated location information when the app is in the foreground"; +NSLocationAlwaysAndWhenInUseUsageDescription="We need to access your location information in order to more accurately scan the Bluetooth lock device at your location."; +NSLocationAlwaysUsageDescription="We need to access your location information in order to more accurately scan the Bluetooth lock device at your location."; +NSLocationWhenInUseUsageDescription="We need to access your location information in order to more accurately scan the Bluetooth lock device at your location."; NSMicrophoneUsageDescription="request microphone for calls"; NSPhotoLibraryUsageDescription="request photo album for avatar upload"; diff --git a/ios/Runner/en.lproj/InfoPlist_xhj.strings b/ios/Runner/en.lproj/InfoPlist_xhj.strings index 4dcbac90..e2789b85 100644 --- a/ios/Runner/en.lproj/InfoPlist_xhj.strings +++ b/ios/Runner/en.lproj/InfoPlist_xhj.strings @@ -11,8 +11,8 @@ NSBluetoothAlwaysUsageDescription="The app uses bluetooth to find, connect and t NSBluetoothPeripheralUsageDescription="The app uses bluetooth to find, connect and transfer data between different devices"; NSCameraUsageDescription="The application requests the camera to take photos for avatar upload and face authentication"; NSContactsUsageDescription="Access the address book to send electronic keys to contacts in the address book"; -NSLocationAlwaysAndWhenInUseUsageDescription="updated location information when applying in the front and backend"; -NSLocationAlwaysUsageDescription="updated location information when the app is in the background"; -NSLocationWhenInUseUsageDescription="updated location information when the app is in the foreground"; +NSLocationAlwaysAndWhenInUseUsageDescription="We need to access your location information in order to more accurately scan the Bluetooth lock device at your location."; +NSLocationAlwaysUsageDescription="We need to access your location information in order to more accurately scan the Bluetooth lock device at your location."; +NSLocationWhenInUseUsageDescription="We need to access your location information in order to more accurately scan the Bluetooth lock device at your location."; NSMicrophoneUsageDescription="request microphone for calls"; NSPhotoLibraryUsageDescription="request photo album for avatar upload"; diff --git a/ios/Runner/info_dev.plist b/ios/Runner/info_dev.plist index d8ed7c28..b9594e80 100755 --- a/ios/Runner/info_dev.plist +++ b/ios/Runner/info_dev.plist @@ -87,11 +87,11 @@ NSFileProtectionKey NSFileProtectionCompleteUntilFirstUserAuthentication NSLocationAlwaysAndWhenInUseUsageDescription - 应用在前台和后台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationAlwaysUsageDescription - 应用在后台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationWhenInUseUsageDescription - 应用在前台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSMicrophoneUsageDescription 应用请求麦克风用来通话 NSPhotoLibraryUsageDescription diff --git a/ios/Runner/info_pre.plist b/ios/Runner/info_pre.plist index 9874419b..23ea7388 100755 --- a/ios/Runner/info_pre.plist +++ b/ios/Runner/info_pre.plist @@ -85,11 +85,11 @@ NSContactsUsageDescription Reason we need access to the contact list NSLocationAlwaysAndWhenInUseUsageDescription - 应用在前台和后台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationAlwaysUsageDescription - 应用在后台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationWhenInUseUsageDescription - 应用在前台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSMicrophoneUsageDescription 应用请求麦克风用来通话 NSPhotoLibraryUsageDescription diff --git a/ios/Runner/info_sky.plist b/ios/Runner/info_sky.plist index 6d6ce72f..89605593 100755 --- a/ios/Runner/info_sky.plist +++ b/ios/Runner/info_sky.plist @@ -85,11 +85,11 @@ NSContactsUsageDescription Reason we need access to the contact list NSLocationAlwaysAndWhenInUseUsageDescription - 应用在前台和后台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationAlwaysUsageDescription - 应用在后台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationWhenInUseUsageDescription - 应用在前台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSMicrophoneUsageDescription 应用请求麦克风用来通话 NSPhotoLibraryUsageDescription diff --git a/ios/Runner/info_xhj.plist b/ios/Runner/info_xhj.plist index e2b52aaa..f6cc0fca 100755 --- a/ios/Runner/info_xhj.plist +++ b/ios/Runner/info_xhj.plist @@ -87,11 +87,11 @@ NSFileProtectionKey NSFileProtectionCompleteUntilFirstUserAuthentication NSLocationAlwaysAndWhenInUseUsageDescription - 应用在前台和后台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationAlwaysUsageDescription - 应用在后台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationWhenInUseUsageDescription - 应用在前台的时候可以搜到更新的位置信息 + 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSMicrophoneUsageDescription 应用请求麦克风用来通话 NSPhotoLibraryUsageDescription diff --git a/ios/Runner/zh-Hans.lproj/InfoPlist.strings b/ios/Runner/zh-Hans.lproj/InfoPlist.strings index 94277ec2..87cecfb2 100644 --- a/ios/Runner/zh-Hans.lproj/InfoPlist.strings +++ b/ios/Runner/zh-Hans.lproj/InfoPlist.strings @@ -11,8 +11,8 @@ NSBluetoothAlwaysUsageDescription="该应用程序使用蓝牙在不同设备之 NSBluetoothPeripheralUsageDescription="该应用程序使用蓝牙在不同设备之间查找、连接和传输数据"; NSCameraUsageDescription="应用请求相机,以便于拍摄照片,用于头像上传及人脸认证"; NSContactsUsageDescription="应用访问通讯录,用于给通讯录中的联系人发送电子钥匙"; -NSLocationAlwaysAndWhenInUseUsageDescription="应用在前台和后台的时候可以搜到更新的位置信息"; -NSLocationAlwaysUsageDescription="应用在后台的时候可以搜到更新的位置信息"; -NSLocationWhenInUseUsageDescription="应用在前台的时候可以搜到更新的位置信息"; +NSLocationAlwaysAndWhenInUseUsageDescription="我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备"; +NSLocationAlwaysUsageDescription="我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备"; +NSLocationWhenInUseUsageDescription="我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备"; NSMicrophoneUsageDescription="应用请求麦克风用来通话"; NSPhotoLibraryUsageDescription="应用请求相册用于头像上传"; diff --git a/ios/Runner/zh-Hans.lproj/InfoPlist_sky.strings b/ios/Runner/zh-Hans.lproj/InfoPlist_sky.strings index 94277ec2..87cecfb2 100644 --- a/ios/Runner/zh-Hans.lproj/InfoPlist_sky.strings +++ b/ios/Runner/zh-Hans.lproj/InfoPlist_sky.strings @@ -11,8 +11,8 @@ NSBluetoothAlwaysUsageDescription="该应用程序使用蓝牙在不同设备之 NSBluetoothPeripheralUsageDescription="该应用程序使用蓝牙在不同设备之间查找、连接和传输数据"; NSCameraUsageDescription="应用请求相机,以便于拍摄照片,用于头像上传及人脸认证"; NSContactsUsageDescription="应用访问通讯录,用于给通讯录中的联系人发送电子钥匙"; -NSLocationAlwaysAndWhenInUseUsageDescription="应用在前台和后台的时候可以搜到更新的位置信息"; -NSLocationAlwaysUsageDescription="应用在后台的时候可以搜到更新的位置信息"; -NSLocationWhenInUseUsageDescription="应用在前台的时候可以搜到更新的位置信息"; +NSLocationAlwaysAndWhenInUseUsageDescription="我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备"; +NSLocationAlwaysUsageDescription="我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备"; +NSLocationWhenInUseUsageDescription="我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备"; NSMicrophoneUsageDescription="应用请求麦克风用来通话"; NSPhotoLibraryUsageDescription="应用请求相册用于头像上传"; diff --git a/ios/Runner/zh-Hans.lproj/InfoPlist_xhj.strings b/ios/Runner/zh-Hans.lproj/InfoPlist_xhj.strings index 60876642..88c23fde 100644 --- a/ios/Runner/zh-Hans.lproj/InfoPlist_xhj.strings +++ b/ios/Runner/zh-Hans.lproj/InfoPlist_xhj.strings @@ -11,8 +11,8 @@ NSBluetoothAlwaysUsageDescription="该应用程序使用蓝牙在不同设备之 NSBluetoothPeripheralUsageDescription="该应用程序使用蓝牙在不同设备之间查找、连接和传输数据"; NSCameraUsageDescription="应用请求相机,以便于拍摄照片,用于头像上传及人脸认证"; NSContactsUsageDescription="应用访问通讯录,用于给通讯录中的联系人发送电子钥匙"; -NSLocationAlwaysAndWhenInUseUsageDescription="应用在前台和后台的时候可以搜到更新的位置信息"; -NSLocationAlwaysUsageDescription="应用在后台的时候可以搜到更新的位置信息"; -NSLocationWhenInUseUsageDescription="应用在前台的时候可以搜到更新的位置信息"; +NSLocationAlwaysAndWhenInUseUsageDescription="我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备"; +NSLocationAlwaysUsageDescription="我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备"; +NSLocationWhenInUseUsageDescription="我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备"; NSMicrophoneUsageDescription="应用请求麦克风用来通话"; NSPhotoLibraryUsageDescription="应用请求相册用于头像上传"; diff --git a/lib/tools/appFirstEnterHandle.dart b/lib/tools/appFirstEnterHandle.dart index e6d63573..129a3cdc 100755 --- a/lib/tools/appFirstEnterHandle.dart +++ b/lib/tools/appFirstEnterHandle.dart @@ -23,9 +23,12 @@ class AppFirstEnterHandle { switch (flagStr) { case isAgreePrivacy: // 隐私协议 if (getFlag != isAgreePrivacy) { - await showPrivacyAgreementAlert(); + final bool? isAgree = await showPrivacyAgreementAlert(); + if (isAgree ?? false) { + await privacySDKInitialization(); + } } - await privacySDKInitialization(); + if (Get.isRegistered()) { Get.find().flushedDeviceInfo(); } @@ -51,8 +54,8 @@ class AppFirstEnterHandle { } //隐私协议弹窗 - Future showPrivacyAgreementAlert() async { - await showCupertinoDialog( + Future showPrivacyAgreementAlert() async { + return await showCupertinoDialog( context: Get.context!, builder: (BuildContext context) { return PopScope( @@ -103,7 +106,8 @@ class AppFirstEnterHandle { }, ), TextSpan( - text: '的全部内容。点击“同意”即表示您同意并接受全部条款。若选择不同意,将无法使用我们的产品和服务,并会退出应用。'.tr + text: '的全部内容。点击“同意”即表示您同意并接受全部条款。若选择不同意,将无法使用我们的产品和服务,并会退出应用。' + .tr .tr), ], ), @@ -123,7 +127,7 @@ class AppFirstEnterHandle { ), onPressed: () { Storage.setString(isAgreePrivacy, isAgreePrivacy); - Navigator.of(context).pop(); + Navigator.of(context).pop(true); getAppFirstEnter(isShowUpdateVersion); }, ), @@ -173,7 +177,8 @@ class AppFirstEnterHandle { }, ), TextSpan( - text: '的全部内容。点击“同意”即表示您同意并接受全部条款。若选择不同意,将无法使用我们的产品和服务,并会退出应用。'.tr + text: '的全部内容。点击“同意”即表示您同意并接受全部条款。若选择不同意,将无法使用我们的产品和服务,并会退出应用。' + .tr .tr), ], ), @@ -193,7 +198,7 @@ class AppFirstEnterHandle { ), onPressed: () { Storage.setString(isAgreePrivacy, isAgreePrivacy); - Navigator.of(context).pop(); + Navigator.of(context).pop(true); getAppFirstEnter(isShowUpdateVersion); }, ), diff --git a/pubspec.yaml b/pubspec.yaml index ab615ff5..f9f08476 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -249,7 +249,7 @@ dependencies: flutter_bugly: ^1.0.2 open_filex: ^4.4.0 - umeng_common_sdk: 1.2.7 + umeng_common_sdk: 1.2.8 dependency_overrides: #强制设置google_maps_flutter_ios 为 2.5.2