diff --git a/app/src/main/java/com/tencent/iot/explorer/link/customview/dialog/UserAgreeDialog.kt b/app/src/main/java/com/tencent/iot/explorer/link/customview/dialog/UserAgreeDialog.kt index 8ef3a840c..dea54306d 100644 --- a/app/src/main/java/com/tencent/iot/explorer/link/customview/dialog/UserAgreeDialog.kt +++ b/app/src/main/java/com/tencent/iot/explorer/link/customview/dialog/UserAgreeDialog.kt @@ -46,34 +46,26 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout tv_confirm = view.findViewById(R.id.tv_confirm) tv_cancel = view.findViewById(R.id.tv_cancel) select_tag_layout = view.findViewById(R.id.select_tag_layout) - iv_agreement = view.findViewById(R.id.iv_agreement) - iv_agreement_status = view.findViewById(R.id.iv_agreement_status) - val partStr0 = context.getString(R.string.register_agree_1) - val partStr1 = context.getString(R.string.register_agree_2) - val partStr2 = context.getString(R.string.register_agree_3) - val partStr3 = context.getString(R.string.register_agree_4) - var showStr = partStr1 + partStr2 + partStr3 - tip_title?.text = showStr - - var agreeStr = partStr0 + showStr - var spannable = SpannableStringBuilder(agreeStr) - spannable.setSpan(IndexClickableSpan(context, 1), - partStr0.length, partStr0.length + partStr1.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) - spannable.setSpan(IndexClickableSpan(context, 2), - agreeStr.length - partStr1.length, agreeStr.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) - tv_register_tip?.movementMethod = LinkMovementMethod.getInstance() - tv_register_tip?.text = spannable + tip_title?.text = context.getString(R.string.register_agree_2) + context.getString(R.string.rule_title_and) + context.getString(R.string.rule_title_private_protect) val agreeContentStrPrefix = context.getString(R.string.rule_content_prefix) + val partStr1 = "《${context.getString(R.string.register_agree_2)}》" + val partStr2 = context.getString(R.string.register_agree_3) + val partStr3 = "《${context.getString(R.string.register_agree_4)}》" + val agreeContentStrMiddle = context.getString(R.string.rule_content_middle) + val partStr4 = "《${context.getString(R.string.rule_content_list)}》" val agreeContentStrSuffix = context.getString(R.string.rule_content_suffix) - var agreeContentStr = agreeContentStrPrefix + showStr + agreeContentStrSuffix + var agreeContentStr = agreeContentStrPrefix + partStr1 + partStr2 + partStr3 + agreeContentStrMiddle + partStr4 + agreeContentStrSuffix var agreeContentSpannable = SpannableStringBuilder(agreeContentStr) agreeContentSpannable.setSpan(IndexClickableSpan(context, 1), agreeContentStrPrefix.length, agreeContentStrPrefix.length + partStr1.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) - val start = agreeContentStrPrefix.length + partStr1.length + partStr2.length + val start1 = agreeContentStrPrefix.length + partStr1.length + partStr2.length agreeContentSpannable.setSpan(IndexClickableSpan(context, 2), - start, start + partStr3.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) + start1, start1 + partStr3.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) + val start2 = agreeContentStrPrefix.length + partStr1.length + partStr2.length + partStr3.length + agreeContentStrMiddle.length + agreeContentSpannable.setSpan(IndexClickableSpan(context, 3), + start2, start2 + partStr4.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) tv_tip_content?.movementMethod = LinkMovementMethod.getInstance() tv_tip_content?.text = agreeContentSpannable @@ -87,8 +79,6 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout override fun onClick(v: View?) { when(v) { select_tag_layout -> { - readed =! readed - freshReadState() } tv_cancel -> { @@ -96,7 +86,8 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout } tv_confirm -> { - if (!readed) return + readed = true + freshReadState() onDismisListener?.onOkClicked() dismiss() } @@ -111,6 +102,7 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout fun onOkClicked() fun onOkClickedUserAgreement() fun onOkClickedPrivacyPolicy() + fun onOkClickedThirdSDKList() } fun setOnDismisListener(onDismisListener: OnDismisListener?) { @@ -136,6 +128,8 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout onDismisListener?.onOkClickedUserAgreement() } else if (index == 2) { onDismisListener?.onOkClickedPrivacyPolicy() + } else if (index == 3) { + onDismisListener?.onOkClickedThirdSDKList() } } diff --git a/app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/RegisterActivity.kt b/app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/RegisterActivity.kt index bc3b98370..79074b182 100644 --- a/app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/RegisterActivity.kt +++ b/app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/RegisterActivity.kt @@ -125,6 +125,7 @@ class RegisterActivity : PActivity(), RegisterView, View.OnClickListener { dlg.setOnDismisListener(object : UserAgreeDialog.OnDismisListener { override fun onDismised() { finish() } override fun onOkClicked() { + presenter.agreement() Utils.setXmlStringValue(this@RegisterActivity, CommonField.AGREED_RULE_FLAG, CommonField.AGREED_RULE_FLAG, "1") if (!checkPermissions(permissions)) { requestPermission(permissions) @@ -180,6 +181,16 @@ class RegisterActivity : PActivity(), RegisterView, View.OnClickListener { OpensourceLicenseActivity.startWebWithExtra(this@RegisterActivity, getString(R.string.register_agree_4), url) } } + + override fun onOkClickedThirdSDKList() { + var url = "" + if (Utils.getLang().contains(CommonField.ZH_TAG)) { + url = CommonField.THIRD_SDK_URL_US_ZH + } else { + url = CommonField.THIRD_SDK_URL_US_EN + } + OpensourceLicenseActivity.startWebWithExtra(this@RegisterActivity, getString(R.string.rule_content_list), url) + } }) } @@ -394,7 +405,7 @@ class RegisterActivity : PActivity(), RegisterView, View.OnClickListener { var agreed = Utils.getStringValueFromXml(this@RegisterActivity, CommonField.AGREED_RULE_FLAG, CommonField.AGREED_RULE_FLAG) agreed?.let { if (it == "1") { - presenter.agreement() +// presenter.agreement() return@unselectedAgreement } } diff --git a/app/src/main/java/com/tencent/iot/explorer/link/kitlink/consts/CommonField.kt b/app/src/main/java/com/tencent/iot/explorer/link/kitlink/consts/CommonField.kt index 4d32dd0e5..11c3b4c7c 100644 --- a/app/src/main/java/com/tencent/iot/explorer/link/kitlink/consts/CommonField.kt +++ b/app/src/main/java/com/tencent/iot/explorer/link/kitlink/consts/CommonField.kt @@ -130,6 +130,8 @@ object CommonField { const val SERVICE_AGREEMENT_URL_US_ZH = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config7.js" const val SERVICE_AGREEMENT_URL_US_EN = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config3.js" const val DELET_ACCOUNT_POLICY_EN = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config6.js" + const val THIRD_SDK_URL_US_ZH = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config12.js" + const val THIRD_SDK_URL_US_EN = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config13.js" /************返回结果通用字段*************/ const val RESPONSE = "Response" diff --git a/app/src/main/res/layout/activity_register.xml b/app/src/main/res/layout/activity_register.xml index 2329d0745..c62175d67 100644 --- a/app/src/main/res/layout/activity_register.xml +++ b/app/src/main/res/layout/activity_register.xml @@ -102,6 +102,6 @@ android:text="@string/get_code" android:textColor="@color/white" android:textSize="@dimen/ts_16" - app:layout_constraintTop_toBottomOf="@+id/ll_register_agreement" /> + app:layout_constraintTop_toBottomOf="@+id/vp_register" /> \ No newline at end of file diff --git a/app/src/main/res/layout/popup_permission_layout.xml b/app/src/main/res/layout/popup_permission_layout.xml index 094463673..3654b8540 100644 --- a/app/src/main/res/layout/popup_permission_layout.xml +++ b/app/src/main/res/layout/popup_permission_layout.xml @@ -73,7 +73,7 @@ android:layout_marginTop="18dp" android:layout_marginRight="20dp" android:lineSpacingExtra="7dp" - android:text="@string/permission_of_detail" + android:text="@string/permission_of_wifi" android:textColor="@color/black_888888" android:textSize="@dimen/ts_14" /> @@ -87,7 +87,7 @@ android:layout_marginRight="20dp" android:layout_marginBottom="20dp" android:lineSpacingExtra="7dp" - android:text="@string/permission_of_detail_lips" + android:text="@string/permission_of_wifi_lips" android:textColor="@color/black" android:textSize="@dimen/ts_14" /> diff --git a/app/src/main/res/layout/popup_user_agree_layout.xml b/app/src/main/res/layout/popup_user_agree_layout.xml index 831c912c2..96683dd56 100644 --- a/app/src/main/res/layout/popup_user_agree_layout.xml +++ b/app/src/main/res/layout/popup_user_agree_layout.xml @@ -28,86 +28,31 @@ android:layout_centerHorizontal="true" android:layout_height="wrap_content"/> - - - - - - - - - - - - - + android:layout_marginBottom="20dp"> - + The device is offline 0 devices Popup title - 为了保证您的个人隐私安全,在进行账号注册前,您需要确认您已经阅读腾讯云 - ,并同意授权腾讯连连为您注册账号信息(如手机号、昵称、头像) - 权限管理 - 请授权腾讯连连以下权限 - 该步骤将为硬件设备配置WiFi网络实现通信,绑定硬件设备与APP用户之间的关系。因此 腾讯连连 需获取以下权限: - · WiFi名称、WiFi密码\n· 手机IP地址 - 为了向您提供对应国家/地区的用户协议和隐私政策,请您选择所在的国家及地区 - 为了使用设备的实时语音/视频通话功能,因此腾讯连连需 获取以下权限: - · 摄像头/麦克风 - 该步骤将为硬件设备配置WiFi网络实现通信,绑定硬件设备与APP用户之间的关系。因此 腾讯连连 需获取以下权限: - · WiFi名称、WiFi密码\n· 手机IP地址 - 您将授权以下个人信息与微信账号绑定: - · 昵称、头像、地区、性别\n· 设备信息 + No + Yes + and + Privacy protection + Third-party information sharing checklist + In order to protect your personal rights and interests, before you use our products, please be sure to carefully read Tencent LLink + ,to help you understand our collection/storage/use/external provision/protection of your personal information and your rights. \nWe will not actively share or transfer your personal information to a third party. If there are other situations in which your personal information is shared or transferred or you need us to share or transfer that to a third party, we will confirm that the third party obtains your agreement to the above actions. For personal information that needs to be shared with third-party service providers in our products, please refer to + . \nIf you have any questions about the above agreement, you can send the question to the official email fanyi@tencent.com of Tencent LLink or to our dedicated department for personal information protection.The mailing address is:Tencent Building, Keji Zhong Road, Nanshan District, Shenzhen, Guangdong, China. Recipient:Legal Department,Data and Privacy Protection Center\n If you agree to the content of the above agreement, please click "Yes" to accept our product service! + Authority management + Please authorize Tencent LLink the following permissions + In order to provide you with the user agreement and privacy policy of your country/region, please select your country/region + In order to use the real-time communication of the device, Tencent LLink needs to obtain the following permissions: + · camera/microphone + This step will configure the WiFi network for the hardware device to achieve communication, and bind the relationship between the hardware device and the APP user. Therefore, Tencent LLink needs to obtain the following permissions: + · WiFi name、WiFi password\n· the IP of the mobile phone + You will authorize the following personal information to be bound to your WeChat account: + · nickname、profile photo、region、gender\n· device information diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index f7f1afc4d..942a218ad 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -681,12 +681,16 @@ 设备已经离线 0个设备 弹框标题 - 为了保证您的个人隐私安全,在进行账号注册前,您需要确认您已经阅读腾讯云 - ,并同意授权腾讯连连为您注册账号信息(如手机号、昵称、头像) + 暂不使用 + 同意 + + 隐私保护 + 第三方信息共享清单 + 为了更好地保障您的个人权益,在您使用我们的产品前,请务必谨慎阅读腾讯连连 + ,以帮助您了解我们对您的个人信息的收集/保存/使用/对外提供/保护等情况以及您享有的权利。\n我们不会主动共享或转让您的个人信息至第三方,如存在其他共享或转让您的个人信息或您需要我们将您的个人信息共享或转让至第三方情形时,我们会直接或确认第三方征得您对上述行为的明示同意。我们的产品中需要与第三方服务商共享的个人信息,请您查阅 + 。\n如您对以上协议有任何疑问,您可将问题发送至腾讯连连官方邮箱fanyi@tencent.com或寄给我们设立的个人信息保护专职部门。邮寄地址为:中国广东省深圳市南山区科技中一路腾讯大厦 法务部 数据及隐私保护中心(收)\n如您同意以上协议内容,请点击“同意”开始接受我们的产品服务! 权限管理 请授权腾讯连连以下权限 - 该步骤将为硬件设备配置WiFi网络实现通信,绑定硬件设备与APP用户之间的关系。因此 腾讯连连 需获取以下权限: - · WiFi名称、WiFi密码\n· 手机IP地址 为了向您提供对应国家/地区的用户协议和隐私政策,请您选择所在的国家及地区 为了使用设备的实时语音/视频通话功能,因此腾讯连连需 获取以下权限: · 摄像头/麦克风 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f7f1afc4d..942a218ad 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -681,12 +681,16 @@ 设备已经离线 0个设备 弹框标题 - 为了保证您的个人隐私安全,在进行账号注册前,您需要确认您已经阅读腾讯云 - ,并同意授权腾讯连连为您注册账号信息(如手机号、昵称、头像) + 暂不使用 + 同意 + + 隐私保护 + 第三方信息共享清单 + 为了更好地保障您的个人权益,在您使用我们的产品前,请务必谨慎阅读腾讯连连 + ,以帮助您了解我们对您的个人信息的收集/保存/使用/对外提供/保护等情况以及您享有的权利。\n我们不会主动共享或转让您的个人信息至第三方,如存在其他共享或转让您的个人信息或您需要我们将您的个人信息共享或转让至第三方情形时,我们会直接或确认第三方征得您对上述行为的明示同意。我们的产品中需要与第三方服务商共享的个人信息,请您查阅 + 。\n如您对以上协议有任何疑问,您可将问题发送至腾讯连连官方邮箱fanyi@tencent.com或寄给我们设立的个人信息保护专职部门。邮寄地址为:中国广东省深圳市南山区科技中一路腾讯大厦 法务部 数据及隐私保护中心(收)\n如您同意以上协议内容,请点击“同意”开始接受我们的产品服务! 权限管理 请授权腾讯连连以下权限 - 该步骤将为硬件设备配置WiFi网络实现通信,绑定硬件设备与APP用户之间的关系。因此 腾讯连连 需获取以下权限: - · WiFi名称、WiFi密码\n· 手机IP地址 为了向您提供对应国家/地区的用户协议和隐私政策,请您选择所在的国家及地区 为了使用设备的实时语音/视频通话功能,因此腾讯连连需 获取以下权限: · 摄像头/麦克风