parent
66fa481a05
commit
eea43ea0da
57 changed files with 651 additions and 1934 deletions
Binary file not shown.
@ -0,0 +1,2 @@ |
|||||||
|
configurations.maybeCreate("default") |
||||||
|
artifacts.add("default", file('level-release.aar')) |
Binary file not shown.
@ -0,0 +1,2 @@ |
|||||||
|
configurations.maybeCreate("default") |
||||||
|
artifacts.add("default", file('rtk-release.aar')) |
Binary file not shown.
@ -0,0 +1,2 @@ |
|||||||
|
configurations.maybeCreate("default") |
||||||
|
artifacts.add("default", file('totalstation-release.aar')) |
Binary file not shown.
@ -1,8 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<summary> |
|
||||||
欢迎使用导线助手App!我们将通过《用户协议》和《隐私政策》帮助您了解我们收集、使用、存储和共享个人信息的情况,以及您所享有的相关权利。 |
|
||||||
• 为了向您提供语音播报、文件生成存储、头像上传、用户注册等功能服务,我们需要使用您的一些存储权限、音视频录制权限、相机权限、获取设备信息等权限及信息。 |
|
||||||
• 我们会采用业界领先的安全技术保护好您的个人信息。 |
|
||||||
您可以通过阅读完整版用户隐私政策,了解个人信息类型与用途的对应关系等更加详尽的个人信息处理规则。 |
|
||||||
如您同意,请点击“同意”开始接受我们的服务。 |
|
||||||
</summary> |
|
@ -1,4 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<summary> |
|
||||||
Welcome to the Surveyor App! Through the "User Agreement" and "Privacy Policy", we will help you understand our collection, use, storage and sharing of personal information, as well as your related rights. • In order to provide you with voice broadcasting, file generation and storage, avatar upload, user registration and other functional services, we need to use some of your storage permissions, audio and video recording permissions, camera permissions, access to device information and other permissions and information. • We will protect your personal information with industry-leading security technology. You can read the full version of the user's privacy policy to understand the more detailed personal information processing rules such as the correspondence between personal information types and uses. If you agree, please click "Agree" to start accepting our services. |
|
||||||
</summary> |
|
@ -1,45 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<content> |
|
||||||
This application respects and protects the personal privacy of all users of the service. In order to provide you with more accurate and personalized services, this application will use and disclose your personal information in accordance with the provisions of this privacy policy. However, this application will treat this information with a high degree of diligence and prudence. Except as otherwise provided in this Privacy Policy, this application will not disclose this information to third parties or provide it to third parties without your prior permission. This app will update this privacy policy from time to time. |
|
||||||
When you agree to this application service use agreement, you are deemed to have agreed to the entire content of this privacy policy. This privacy policy is an integral part of this application service usage agreement. |
|
||||||
|
|
||||||
Scope of application |
|
||||||
(a) when you register for this application account, the personal registration information you provided in accordance with the requirements of this application; |
|
||||||
(b) |
|
||||||
When you use this application web service or visit this application platform web page, this application automatically receives and records information on your browser and computer, including but not limited to your IP address, browser type, language used , Access date and time, software and hardware characteristic information, and web page records such as your requirements; |
|
||||||
(c) User personal data obtained by this application from business partners through legal channels. |
|
||||||
You understand and agree that the following information does not apply to this privacy policy: |
|
||||||
(a) the keyword information you enter when using the search services provided by this application platform; |
|
||||||
(b) relevant information and data collected by this application and released by you in this application, including but not limited to participation activities, transaction information and evaluation details; |
|
||||||
(c) Violations of laws or violations of this application rule and the actions this application has taken against you. |
|
||||||
2. Use of information |
|
||||||
(a) This application will not provide, sell, rent, share or trade your personal information to any unrelated third party, unless you have obtained your permission in advance, or the third party and this application (including this application affiliate) alone or jointly To provide you with a service, and after the service has ended, it will be barred from access to all of this material, including its previous access. |
|
||||||
(b) This application also does not allow any third party to collect, edit, sell or disseminate your personal information by any means. If any user of this application platform engages in the above activities, once found, this application has the right to immediately terminate the service agreement with that user. |
|
||||||
(c) |
|
||||||
For the purpose of serving users, this application may provide you with information that is of interest to you by using your personal information, including but not limited to sending you product and service information, or sharing information with this application partner so that they can send you Information about its products and services (the latter requires your prior consent). |
|
||||||
3. Information disclosure |
|
||||||
Under the following circumstances, this application will disclose your personal information in whole or in part according to your personal wishes or legal requirements: |
|
||||||
(a) disclosure to third parties with your prior consent; |
|
||||||
(b) in order to provide the products and services you have requested, your personal information must be shared with third parties; |
|
||||||
(c) disclosure to third parties or administrative or judicial bodies in accordance with the relevant provisions of the law or the requirements of administrative or judicial bodies; |
|
||||||
(d) if you have violated relevant Chinese laws, regulations or this application service agreement or related rules, you need to disclose it to a third party; |
|
||||||
(e) If you are a qualified intellectual property complainant and have filed a complaint, you should disclose it to the respondent at the request of the respondent so that both parties can deal with possible disputes over rights; |
|
||||||
(f) In a transaction created on the application platform, if any party to the transaction fulfills or partially fulfills the transaction obligations and requests for information disclosure, the application has the right to determine the necessary means to provide the user with the contact method of the counterparty Information to facilitate the completion of a transaction or the resolution of a dispute. |
|
||||||
(g) Other disclosures that this application deems appropriate in accordance with laws, regulations or website policies. |
|
||||||
4. Information storage and exchange |
|
||||||
The information and data collected about you by this application will be stored on the server of this application and / or its affiliates. Such information and data may be transferred to your country, region or outside the country where the information and data are collected by this application and in Accessed, stored and displayed overseas. |
|
||||||
5. Use of cookies |
|
||||||
(a) If you do not refuse to accept cookies, this application will set or access cookies on your computer |
|
||||||
So that you can log in or use the services or features of this application platform that rely on cookies. This application uses cookies to provide you with more thoughtful personalized services, including promotion services. |
|
||||||
(b) |
|
||||||
You have the right to choose to accept or decline cookies. You can refuse to accept cookies by modifying your browser settings. However, if you choose to decline cookies, you may not be able to log in or use the web services or features of this application that rely on cookies. |
|
||||||
(c) The relevant information obtained through the cookies set by this application will apply this policy. |
|
||||||
6. Information security |
|
||||||
(a) |
|
||||||
This application account has security protection functions, please keep your username and password information properly. This application will ensure that your information is not lost, misused and altered by security measures such as encrypting user passwords. Despite the aforementioned security measures, please also note that there are no "perfect security measures" on the information network. |
|
||||||
(b) When using this application network service for online transactions, you must inevitably ask the counterparty or potential transaction pair |
|
||||||
7. Changes to this privacy policy |
|
||||||
(a) if we decide to change our privacy policy, we will post those changes in this policy, on our website, and where we deem appropriate, so that you understand how we collect and use your personal information and who can access it, And under what circumstances we will disclose this information. |
|
||||||
(b) The company reserves the right to modify this policy at any time, so please check it frequently. If major changes are made to this policy, the company will notify through a website notification. |
|
||||||
Party to disclose their personal information, such as contact information or postal address. Please protect your personal information and provide it to others only when necessary. If you find that your personal information has been leaked, especially the user name and password of this application, please contact the customer service of this application immediately so that this application can take corresponding measures. |
|
||||||
</content> |
|
@ -1,117 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<agreements> |
|
||||||
本协议是导线助手手机应用程序(以下简称导线助手或“本应用”)与应用使用人(以下简称“用户”或“您”)所达成的协议。为使用导线助手应用的服务,您应当阅读并遵守本《用户服务协议》(以下简称“本协议”)。请您使用本应用以前,务必审慎阅读、充分理解各条款内容,特别是免除或者限制责任的条款、管辖与法律适用条款,以及开通或使用某项服务的单独协议。限制、免责条款可能以黑体加粗或加下划线的形式提示您重点注意。 |
|
||||||
您使用本应用的服务即视为您已仔细阅读并充分了解前述协议的内容,并同意接受上述协议的约束。除非您已阅读并接受本协议所有条款,否则您无权使用本应用所提供的服务。 |
|
||||||
如果您未满18周岁,请在法定监护人的陪同下阅读本协议,并特别注意未成年人使用条款。 |
|
||||||
我们的产品会传输用户已安装应用的相关信息。在使用这些信息之前,我们会先获取用户的授权,经许 可后,才会进行下一步。我们不会将这些信息用于任何其它非法用途。 |
|
||||||
一、使用者非个人化信息 |
|
||||||
我们将通过您的IP地址来收集使用者非个人化的信息,例如您的操作系统的版本、运行环境、运营商等,以优化在您手机屏幕上显示的页面。通过收集上述信息,我们亦进行客流量统计,从而改进本应用的管理和服务。 |
|
||||||
这些无关个人身份的信息能帮助我们辨别导线助手最受欢迎的地区并确定我们推广活动的有效性。此外,我们也可能将这些信息披露给我们的客户,使他们知道点击他们广告的人数。 |
|
||||||
二、个人资料 |
|
||||||
当您在本用于进行用户注册登记、参加网上论坛等各种活动,或者在使用本应用特定服务时,本应用可能会通过注册表格等形式要求您提供一些个人资料。这些个人资料可能包括: |
|
||||||
个人识别资料:如姓名、性别、年龄、出生日期、身份证号码(或护照号码)、电话、通信地址、住址、电子邮件地址等; |
|
||||||
个人背景:如职业、教育程度、收入状况、家庭状况、征信记录等; |
|
||||||
个人经历:如个人职业经历、社会履历等。 |
|
||||||
特定情形下,需要您按照本应用的要求提供所需个人资料后才能继续使用本应用的全部或部分服务,请您务必按照要求提供个人资料。否则,可能无法继续 |
|
||||||
使用本应用的全部或部分服务。在前述情形下,本应用会提前向您提醒并说明。除非适用法律法规、政府机关、司法机关或者其他第三方对本应用作出强制要 |
|
||||||
求,本应用不会对您提供的信息进行实质审核,如果您提供的信息错误或者不准确,由此产生的责任由您自行承担。 |
|
||||||
请了解,在未经您同意及确认之前,本应用不会将您为参加本应用之特定活动所提供的资料利用于经您同意的用途以外的其它目的。惟有按下列第六条规定按照政府及法律要求披露时不在此限。 |
|
||||||
三、信息安全 |
|
||||||
本应用将对您所提供的资料进行严格的管理及保护,本应用将使用相应的技术,防止您的个人资料丢失、被盗用或遭篡改。但因计算机系统和网络技术的限制,本应用可能会因受到第三方的攻击或破坏,导致用户的个人信息被恶意篡改、盗取或泄露,本应用将采取合理措施防止类似事件的发生,并将配合国家机关和第三方对类似事件进行调查或提起必要的行动(包括但不限于诉讼等)。对于非因本应用过错原因而导致的信息安全问题,您同意给予谅解并豁免本应用可能承担的任何责任。 |
|
||||||
四、用户权利 |
|
||||||
您对于自己的个人资料享有以下的权利: |
|
||||||
随时查询及请求阅览; |
|
||||||
随时请求补充或更正; |
|
||||||
随时请求删除; |
|
||||||
请求停止电脑处理及利用。 |
|
||||||
五、限制利用原则 |
|
||||||
本应用惟在符合下列条件之一,方对收集之个人资料进行必要范围以外之使用: |
|
||||||
已取得您的书面同意; |
|
||||||
为免除您在生命、身体或财产方面之急迫危险; |
|
||||||
为防止他人权益之重大危害; |
|
||||||
为增进公共利益,且无损于您的重大利益。 |
|
||||||
六、披露个人资料 |
|
||||||
当政府机关依照法定程序要求本应用披露个人资料时,本应用将根据执法单位之要求或为公共安全之目的提供个人资料。在此情况下之任何披露,本应用均得免责。 |
|
||||||
七、Cookies |
|
||||||
Cookies是指一种技术,当使用者使用没有Cookies装置的本应用时,本应用之服务器会自动发送Cookies至您的浏览器内,并存储到您的手机硬盘内, |
|
||||||
此Cookies便负责记录日后您访问本应用的种种活动、个人资料、浏览习惯、消费习惯甚至信用记录。 |
|
||||||
运用Cookies技术,本应用能够为您提供更加周到的服务,本应用将会运用Cookies追访您的喜好,从而向您提供感兴趣的信息资料或存储密码,以便您造访本应用时不必每次重复输入密码。 |
|
||||||
八、未成年人隐私权的保护 |
|
||||||
本应用将建立和维持合理的程序,以保护未成年人个人资料的保密性及安全性。本应用郑重声明:任何18岁以下的未成年人参加网上活动应事先 |
|
||||||
得到家长或其法定监护人(以下统称为“监护人”)的可经查证的同意。 |
|
||||||
监护人应该承担保护未成年人在网络环境下的隐私权的首要责任。 |
|
||||||
本应用收集未成年人的个人资料,仅为回复未成年人特定要求的目的,一经回复完毕即从记录中删除,而不会保留这些资料做进一步的利用。 |
|
||||||
未经监护人之同意,本应用将不会使用未成年人之个人资料,亦不会向任何第三方披露或传送可识别该未成年人的个人资料。本应用如收集监护人或未成年人的姓名或其它网络通讯资料之目的仅是为获得监护人同意,则在经过一段合理时间仍未获得同意时,将主动从记录中删除此类资料。 |
|
||||||
若经未成年人之监护人同意,本应用可对未成年人之个人资料进行收集,本应用将向监护人提供: |
|
||||||
审视自其子女或被监护人收集之资料的机会; |
|
||||||
拒绝其子女或被监护人的个人资料被进一步的收集或利用的机会; |
|
||||||
变更或删除其子女或被监护人个人资料的方式。 |
|
||||||
监护人有权拒绝本应用与其子女或被监护人做进一步的联络。 |
|
||||||
本应用收集未成年人的个人资料,这些资料只是单纯作为保护未成年人参与网络活动时的安全,而非是作为其它目的来利用。本应用保证不会要求未成年人提供额外的个人资料,以作为允许其参与网上活动的条件。 |
|
||||||
九、用户违法行为 |
|
||||||
您在使用本应用服务时须遵守法律法规,不得利用本应用服务从事任何违法违规行为,包括但不限于: |
|
||||||
(1)发布、传送、传播、储存危害国家安全统一、破坏社会稳定、违反公序良俗、侮辱、诽谤、淫秽、暴力以及任何违反国家法律法规的内容; |
|
||||||
(2)发布、传送、传播、储存侵害他人知识产权、商业秘密等合法权利的内容; |
|
||||||
(3)虚构事实、隐瞒真相以误导、欺骗他人; |
|
||||||
(4)发布、传送、传播广告信息及垃圾信息; |
|
||||||
(5)其他法律法规禁止的行为。 |
|
||||||
如果您违反本条之约定,有权国家机关可能会对您提起诉讼、罚款或采取其他制裁措施,并要求本应用给予协助或支持,由此产生的责任均应当由您自行承担。造成损害的,您应依法予以赔偿,本应用不承担任何责任。 |
|
||||||
如果在您使用本应用服务时违反本条约定,本应用有权进行独立判断并采取技术手段予以删除、屏蔽或断开链接。同时,本应用有权视您的行为性质,采取包括但不限于暂停或终止服务,限制、冻结或终止注册账号等,追究法律责任等措施。 |
|
||||||
如果您违反本条约定,导致任何第三方损害的,您应当独立承担责任;导致本应用遭受损失的,您也应当一并赔偿。 |
|
||||||
十、遵守法律和监管政策 |
|
||||||
您在使用本服务过程中应当遵守当地相关的法律法规和监管政策,并尊重当地的道德和风俗习惯。如果您的行为违反了当地法律法规或道德风俗,您应当为此独立承担责任。 |
|
||||||
您应避免因使用本服务而使本应用卷入政治和公共事件,否则本应用有权暂停或终止对您的服务。 |
|
||||||
十一、合法传播和第三方投诉处理 |
|
||||||
您通过本服务发送或传播的内容(包括但不限于网页、文字、图片、音频、视频、图表等)均由您自行承担责任。 |
|
||||||
您发送或传播的内容应有合法来源,相关内容为您所有或您已获得权利人的授权。 |
|
||||||
您同意本应用可为履行本协议或提供本服务的目的而使用您发送或传播的内容。 |
|
||||||
如果本应用收到权利人通知,主张您发送或传播的内容侵犯其相关权利的,您同意本应用有权进行独立判断并采取删除、屏蔽或断开链接等措施。 |
|
||||||
您使用本服务时不得违反国家法律法规、侵害他人合法权益。您理解并同意,如您被他人投诉侵权或您投诉他人侵权,本应用有权将争议中相关方的主体、联系方式、 |
|
||||||
投诉相关内容等必要信息提供给其他争议方或相关部门,以便及时解决投诉纠纷,保护他人合法权益。 |
|
||||||
十二、免责 |
|
||||||
除上述第六条规定属免责外,下列情况时本应用亦不需承担任何责任: |
|
||||||
不可抗力或意外事件等风险因素,导致本应用服务发生中断。 |
|
||||||
由于您将用户密码告知他人或与他人共享注册账户,或者您操作不当而导致的任何损失; |
|
||||||
任何由于计算机问题、黑客攻击、计算机病毒侵入或发作、因政府管制而造成的暂时性关闭等影响网络正常经营之不可抗力而造成的个人资料泄露、丢失、被盗用或被篡改等; |
|
||||||
用户或本应用的电脑软件、系统、硬件和通信线路出现故障; |
|
||||||
本应用的网页上有与其他网站网页的链接,包括网页上的广告。本应用对其他任何网站的内容、隐私政策或运营,或经营这些网站的公司的行为概不负责。在向这些网与本应用链接的其他网站提供个人信息以前,请查阅它们的隐私政策。 |
|
||||||
用户通过非本应用授权的方式使用本服务; |
|
||||||
由于与本应用链接的其它网站所造成之个人资料泄露及由此而导致的任何法律争议。 |
|
||||||
由于用户使用第三方服务而导致的损失或产生的任何争议。其他本应用无法控制或合理预见的情形。 |
|
||||||
由于用户粗心、图纸错误、放样方法错误等个人原因或第三方原因导致的损失。 |
|
||||||
由于用户上传具有保密级别数据而导致的泄密行为 |
|
||||||
您理解并同意,在使用本服务的过程中,可能会遇到网络信息或其他用户行为带来的风险,本应用不对任何信息的真实性、适用性、合法性承担责任,也不对因侵权行为给您造成的损害负责。 |
|
||||||
十三、第三方服务 |
|
||||||
您在本应用平台上使用第三方提供的产品或服务时,除遵守本协议约定外,还应遵守第三方的用户协议。 |
|
||||||
您已知悉并了解,本应用平台上所链接或嵌入的第三方服务并非本应用提供,如果您对第三方服务有异议,可以直接与第三方联系,也可以向本应用反馈。本应用将协助您联系第三方并转达您的需求和意见。 |
|
||||||
您确认并同意,在您使用第三方服务时,除非适用法律有明确规定,您和第三方的纠纷应由您和第三方解决。根据适用法律的规定,本应用需要承担责任的,本应用和第三方对可能出现的纠纷在法律规定和约定的范围内各自承担责任。 |
|
||||||
十四、协议的生效与变更 |
|
||||||
您使用本应用的服务即视为您已阅读本协议并接受本协议的约束。 |
|
||||||
本应用有权在必要时修改本协议条款。您可以在相关服务页面查阅最新版本的协议条款。 |
|
||||||
本协议条款变更后,如果您继续使用本应用提供的软件或服务,即视为您已接受修改后的协议。如果您不接受修改后的协议,应当停止使用本应用提供的软件或服务。 |
|
||||||
十五、服务的变更、中断、终止 |
|
||||||
本应用可能会对服务内容进行变更,也可能会中断、中止或终止服务。您理解并同意,本应用有权自主决定经营策略。 |
|
||||||
在本应用发生合并、分立、收购、资产转让时,本应用可向第三方转让本服务下相关资产;本应用也可在单方通知您后,将本协议下部分或全部服务转交由第三方运营或履行。具体受让主体以本应用通知的为准。 |
|
||||||
如发生下列任何一种情形,本应用有权不经通知而中断或终止向您提供的服务: |
|
||||||
(1)根据法律规定您应提交真实信息,而您提供的个人资料不真实、或与注册时信息不一致又未能提供合理证明; |
|
||||||
(2)您违反相关法律法规或本协议的约定; |
|
||||||
(3)按照法律规定或主管部门的要求; |
|
||||||
(4)出于安全的原因或其他必要的情形。 |
|
||||||
您有责任自行备份存储在本服务中的数据。如果您的服务被终止,本应用可以从服务器上永久地删除您的数据,但法律法规另有规定的除外。服务终止后,本应用没有义务向您返还数据。 |
|
||||||
十六、管辖与法律适用 |
|
||||||
本协议的成立、生效、履行、解释及纠纷解决,适用中华人民共和国大陆地区法律(不包括冲突法)。 |
|
||||||
本协议签订地为中华人民共和国上海市静安区。 |
|
||||||
若您和本应用之间发生任何纠纷或争议,首先应友好协商解决;协商不成的,您同意将纠纷或争议提交本协议签订地(即中国郑州市)有管辖权的人民法院管辖。 |
|
||||||
本协议所有条款的标题仅为阅读方便,本身并无实际涵义,不能作为本协议涵义解释的依据。 |
|
||||||
本协议条款无论因何种原因部分无效或不可执行,其余条款仍有效,对双方具有约束力。 |
|
||||||
十七、激活许可 |
|
||||||
导线助手内部有两种激活形式,激活后可以使用部分限制功能 |
|
||||||
1.绑定手机硬件(主板)形式,软件里可以自助激活,或找客服人员索要,换手机或更换主板需要重新购买 |
|
||||||
2.按服务周期购买形式,供购买的服务周期分为月、季、半年、年,分别对应30天、90天、180天和365天。服务到期后,部分功能将无法使用,您可以选择再次购买一个服务周期。 |
|
||||||
本平台可能会对服务内容进行变更,也可能会中断、中止或终止服务。您理解并同意,本平台有权自主决定经营策略。 |
|
||||||
如果发生本平台未能在服务周期内提供应许内容的情况,您有权申请退还剩余服务周期对应的款项。 |
|
||||||
如您因发布广告等其他垃圾信息被注销账号,本平台将不对您购买的服务周期另做补偿。 |
|
||||||
如果因安卓系统等第三方更新导致导线助手无法识别手机硬件信息而导致用户无法继续使用付费项目的,导线助手有权停止服务。当用户降级系统或撤销更新,手机回到购买时状态时,导线助手应继续免费提供相应的服务。 |
|
||||||
|
|
||||||
导线助手对以上条款保有最终解释权。 |
|
||||||
</agreements> |
|
@ -1,116 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<agreements> |
|
||||||
This agreement is an agreement reached between the surveyor's mobile application (hereinafter referred to as surveyor or "this application") and the application user (hereinafter referred to as "user" or "you"). In order to use the services of the Surveyor Application, you should read and abide by this User Service Agreement (hereinafter referred to as "this Agreement"). Before using this application, please read carefully and fully understand the content of each clause, especially the clauses of exemption or limitation of liability, the provisions of jurisdiction and law, and the separate agreement to open or use a service. Limitations and disclaimers may be highlighted in bold or underlined. |
|
||||||
Your use of the services of this application shall be deemed that you have carefully read and fully understood the contents of the foregoing agreement, and agree to be bound by the foregoing agreement. Unless you have read and accepted all the terms of this agreement, you are not authorized to use the services provided by this application. |
|
||||||
If you are under the age of 18, please read this agreement with your legal guardian and pay special attention to the terms of use for minors. |
|
||||||
Our products transmit information about apps that users have installed. Before using this information, we will obtain authorization from the user, and then proceed to the next step after permission is obtained. We will not use this information for any other illegal purpose. |
|
||||||
I. User non-personalized information |
|
||||||
We will collect non-personalized information of users through your IP address, such as your operating system version, operating environment, operator, etc., to optimize the pages displayed on your mobile phone screen. By collecting the above information, we also perform passenger traffic statistics to improve the management and service of this application. |
|
||||||
This non-personally identifiable information helps us identify the most popular areas for surveyors and determine the effectiveness of our promotional activities. In addition, we may disclose this information to our customers so that they know how many people click on their ads. |
|
||||||
Personal data |
|
||||||
When you are using this application for user registration, participating in online forums and other activities, or when using specific services of this application, this application may ask you to provide some personal information through registration forms and other forms. These personal data may include: |
|
||||||
Personal identification information: such as name, gender, age, date of birth, ID number (or passport number), telephone, mailing address, residential address, email address, etc .; |
|
||||||
Personal background: such as occupation, education, income status, family status, credit history, etc .; |
|
||||||
Personal experience: such as personal professional experience, social resume, etc. |
|
||||||
In certain situations, you need to provide the required personal information in accordance with the requirements of this application before you can continue to use all or part of the services of this application. Please be sure to provide personal information in accordance with the requirements. Otherwise, you may not be able to continue |
|
||||||
Use all or part of the services of this application. In the aforementioned situation, this app will remind and explain to you in advance. Unless applicable laws and regulations, government agencies, judicial authorities, or other third parties mandate this application |
|
||||||
Request, this application will not conduct a substantive review of the information you provide. If the information you provide is wrong or inaccurate, you will be responsible for the resulting responsibility. |
|
||||||
Please understand that without your consent and confirmation, this app will not use the data you provide for participating in specific activities of this app for purposes other than those for which you have agreed. Except when the disclosure is required by the government and the law in accordance with Article 6 below. |
|
||||||
Information security |
|
||||||
This application will strictly manage and protect the information you provide. This application will use corresponding technology to prevent your personal data from being lost, stolen or tampered with. However, due to the limitations of computer systems and network technologies, this application may be attacked or damaged by third parties, resulting in the user's personal information being maliciously tampered with, stolen or leaked. This application will take reasonable measures to prevent similar incidents, and Will cooperate with national authorities and third parties to investigate similar matters or initiate necessary actions (including but not limited to litigation, etc.). For information security issues that are not caused by the fault of this application, you agree to understand and waive any responsibility that this application may assume. |
|
||||||
User rights |
|
||||||
You have the following rights regarding your personal data: |
|
||||||
Enquiries and requests for viewing at any time; |
|
||||||
Request supplements or corrections at any time; |
|
||||||
Request deletion at any time; |
|
||||||
Request to stop computer processing and use. |
|
||||||
V. Restricted Use Principle |
|
||||||
This application can only use the collected personal data beyond the necessary scope if it meets one of the following conditions: |
|
||||||
Has obtained your written consent; |
|
||||||
To relieve you of imminent danger in life, body or property; |
|
||||||
To prevent major harm to the rights and interests of others; |
|
||||||
To promote the public interest without prejudice to your major interests. |
|
||||||
6. Disclosure of Personal Information |
|
||||||
When government agencies require this application to disclose personal data in accordance with legal procedures, this application will provide personal data at the request of law enforcement agencies or for public safety purposes. Any disclosure in this case shall be exempt from this application. |
|
||||||
7. Cookies |
|
||||||
Cookies refer to a technology. When a user uses this application without a cookie device, the server of this application will automatically send cookies to your browser and store them on your mobile hard disk. |
|
||||||
These cookies are responsible for recording your various activities, personal data, browsing habits, spending habits and even credit history of your future access to this application. |
|
||||||
Using cookies technology, this application can provide you with more thoughtful services. This application will use cookies to follow your preferences, so as to provide you with interesting information or storage passwords so that you do not have to repeat each time you visit this application enter password. |
|
||||||
Protection of the privacy of minors |
|
||||||
This application will establish and maintain reasonable procedures to protect the confidentiality and security of minors' personal data. This application solemnly declares that any minor under 18 years of age should participate in online activities in advance |
|
||||||
Obtain the verifiable consent of the parent or his legal guardian (collectively referred to as the "guardian"). |
|
||||||
The guardian should bear the primary responsibility for protecting the privacy of minors in the online environment. |
|
||||||
This application collects the personal data of minors for the purpose of responding to the specific requirements of the minors. Once the response is completed, it will be deleted from the records without retaining these data for further use. |
|
||||||
Without the consent of the guardian, this application will not use the personal data of the minor, nor will it disclose or transmit to any third party personal data that can identify the minor. If this application collects the name of a guardian or a minor or other online communication materials for the sole purpose of obtaining the consent of the guardian, if no consent has been obtained after a reasonable period of time, such information will be actively deleted from the record. |
|
||||||
With the consent of the guardian of the minor, this app can collect the personal data of the minor, and this app will provide the guardian with: |
|
||||||
Opportunities to review information collected from their children or guardians; |
|
||||||
Opportunities to deny the further collection or use of the personal data of their children or guardians; |
|
||||||
How to change or delete personal information of their children or guardians. |
|
||||||
The guardian has the right to refuse this application to make further contact with its children or ward. |
|
||||||
This application collects personal data of minors. These data are only used to protect the safety of minors when they participate in online activities, and not for other purposes. This app guarantees that minors will not be required to provide additional personal information as a condition to allow them to participate in online activities. |
|
||||||
Nine, user illegal behavior |
|
||||||
You must abide by laws and regulations when using this application service, and you must not use this application service to engage in any illegal acts, including but not limited to: |
|
||||||
(1) Publishing, transmitting, disseminating, and storing contents that endanger national security and unity, undermine social stability, violate public order and good customs, insult, defamation, obscenity, violence, and any content that violates national laws and regulations; |
|
||||||
(2) Publishing, transmitting, disseminating, and storing content that infringes on the intellectual property rights, trade secrets, and other legal rights of others; |
|
||||||
(3) Fictional facts, concealing the truth to mislead and deceive others; |
|
||||||
(4) Publishing, transmitting, and disseminating advertising information and spam; |
|
||||||
(5) Other acts prohibited by laws and regulations. |
|
||||||
If you violate the provisions of this article, the competent state authority may file a lawsuit, fine or take other sanctions against you, and ask for assistance or support for this application, and the resulting responsibility should be borne by you. If it causes damage, you should compensate it according to law, and this application will not bear any responsibility. |
|
||||||
If you violate this agreement when you use this application service, this application has the right to make independent judgment and take technical measures to delete, block or disconnect the link. At the same time, depending on the nature of your behavior, this application has the right to take measures including, but not limited to, suspending or terminating services, restricting, freezing, or terminating registered accounts, etc., and pursue legal responsibilities. |
|
||||||
If you violate this agreement and cause damage to any third party, you shall be solely responsible; if you cause losses to this application, you shall also pay compensation. |
|
||||||
X. Compliance with laws and regulatory policies |
|
||||||
In using this service, you should abide by relevant local laws and regulations and regulatory policies, and respect local morals and customs. If your actions violate local laws and regulations or ethics, you are solely responsible for this. |
|
||||||
You should avoid getting the app involved in political and public events as a result of using the service, otherwise the app has the right to suspend or terminate the service to you. |
|
||||||
Eleven, legal dissemination and handling of third-party complaints |
|
||||||
The content (including but not limited to web pages, text, pictures, audio, video, graphics, etc.) that you send or disseminate through this service is your responsibility. |
|
||||||
The content you send or disseminate should be from a legitimate source, the content is owned by you or you have been authorized by the right holder. |
|
||||||
You agree that this application may use the content you send or distribute for the purpose of fulfilling this agreement or providing this service. |
|
||||||
If the app receives notification from the right holder that the content you sent or transmitted violates its related rights, you agree that the app has the right to make independent judgments and take measures such as removing, blocking or disconnecting the link. |
|
||||||
When using this service, you must not violate national laws and regulations and infringe on the legal rights and interests of others. You understand and agree that if you are complained of infringement by others or you have complained of infringement by others, this app has the right to change the subject, contact information, |
|
||||||
The necessary information such as the content of the complaint is provided to other dispute parties or relevant departments in order to resolve the complaint dispute in a timely manner and protect the legitimate rights and interests of others. |
|
||||||
12. Disclaimer |
|
||||||
In addition to the exemption provided in Article 6 above, this application does not need to bear any responsibility in the following situations: |
|
||||||
Risk factors such as force majeure or accidents cause the application service to be interrupted. |
|
||||||
Any loss caused by you telling your user password to others or sharing a registered account with others, or your improper operation; |
|
||||||
Any personal data leakage, loss, theft or tampering caused by computer force, force majeure that affects the normal operation of the network due to computer problems, hacking attacks, computer virus intrusion or outbreak, temporary shutdown due to government control, etc. |
|
||||||
The user or the application's computer software, system, hardware, and communication lines have failed; |
|
||||||
The web pages of this application have links to the web pages of other websites, including advertisements on the web pages. This application is not responsible for the content, privacy policies, or operations of any other website, or the behavior of the company that operates those websites. Please review their privacy policies before providing personal information to these websites and other websites linked to this application. |
|
||||||
Users use the service in ways not authorized by this application; |
|
||||||
Personal data leakage caused by other websites linked to this application and any legal disputes arising therefrom. |
|
||||||
Loss or any dispute arising from the use of third party services by the user. Other situations beyond the control of this application or reasonably foreseeable. |
|
||||||
Loss due to personal care or user's carelessness, wrong drawing, wrong stakeout method, etc. |
|
||||||
Leaks due to users uploading confidential data |
|
||||||
You understand and agree that in the process of using this service, you may encounter risks brought by network information or other user behaviors. This application is not responsible for the authenticity, applicability, legality of any information, and is not responsible for infringement Liability for damage caused to you. |
|
||||||
Thirteenth party services |
|
||||||
When you use products or services provided by third parties on this application platform, in addition to complying with this agreement, you should also comply with the third party's user agreement. |
|
||||||
You know and understand that the third-party services linked or embedded on this application platform are not provided by this application. If you have any objection to the third-party services, you can directly contact the third party or provide feedback to this application. This application will assist you in contacting third parties and communicating your needs and opinions. |
|
||||||
You acknowledge and agree that when you use third-party services, unless you are clearly required by applicable law, your dispute with the third party shall be resolved by you and the third party. According to the provisions of applicable laws, if this application needs to bear responsibility, this application and the third party shall bear their own responsibility for possible disputes within the scope stipulated by law and agreement. |
|
||||||
14. Effectiveness and changes of the agreement |
|
||||||
Your use of the services of this application is deemed that you have read this agreement and are bound by this agreement. |
|
||||||
This application reserves the right to modify the terms of this agreement if necessary. You can find the latest version of the agreement terms on the relevant service page. |
|
||||||
After changing the terms of this agreement, if you continue to use the software or services provided by this application, you are deemed to have accepted the modified agreement. If you do not accept the modified agreement, you should stop using the software or services provided by this application. |
|
||||||
15. Change, Interruption and Termination of Services |
|
||||||
This application may change the content of the service, and may also interrupt, suspend or terminate the service. You understand and agree that this application has the right to determine its own business strategy. |
|
||||||
When the application merges, splits, acquires, or transfers assets, the application can transfer the relevant assets under the service to a third party; the application can also transfer some or all of the services under this agreement to a third party for operation after the unilateral notification Or fulfill. The specific transferee is subject to the notification in this application. |
|
||||||
This app reserves the right to interrupt or terminate the services provided to you without notice if any of the following situations occur: |
|
||||||
(1) According to the law, you should submit true information, and the personal information you provided is not true, or is inconsistent with the information at the time of registration, and fails to provide reasonable proof; |
|
||||||
(2) you violate the relevant laws and regulations or the agreement of this agreement; |
|
||||||
(3) In accordance with legal regulations or requirements of competent authorities; |
|
||||||
(4) For security reasons or other necessary situations. |
|
||||||
You are responsible for backing up the data stored in the Service yourself. If your service is terminated, this application may permanently delete your data from the server, unless otherwise provided by laws and regulations. After the service is terminated, the app is not obliged to return data to you. |
|
||||||
16.Jurisdiction and application of law |
|
||||||
The establishment, entry into force, performance, interpretation and dispute resolution of this agreement shall be governed by the laws of the People's Republic of China (excluding conflict of laws). |
|
||||||
This agreement was signed in Zhengzhou, People's Republic of China. |
|
||||||
If there is any dispute or dispute between you and this application, it should be settled through friendly negotiation first; if the negotiation fails, you agree to submit the dispute or dispute to the jurisdiction of the people's court in the place where this agreement is signed (ie Zhengzhou, China). |
|
||||||
The headings of all the terms of this agreement are for convenience only. They have no actual meaning and cannot be used as a basis for interpreting the meaning of this agreement. |
|
||||||
No matter what the terms of this agreement are partially invalid or unenforceable, the remaining terms are still valid and binding on both parties. |
|
||||||
Seventeen, pay |
|
||||||
Charge for some functions in surveyor |
|
||||||
Binding mobile phone hardware (motherboard), and automatically generate an activation code after payment, or ask for customer service personnel, you need to pay for a new phone or motherboard |
|
||||||
This platform may change the content of the service, and may also interrupt, suspend or terminate the service. You understand and agree that the platform has the right to independently determine its business strategy. |
|
||||||
In the event that the platform fails to provide the promised content during the service period, you have the right to apply for a refund of the amount corresponding to the remaining service period. |
|
||||||
If your account is cancelled due to other spam information such as advertising, this platform will not make additional compensation for the service cycle you purchased. |
|
||||||
If a third-party update such as the Android system prevents the surveyor from recognizing the hardware information of the phone and the user cannot continue to use the paid item, the surveyor has the right to stop the service. When the user downgrades the system or cancels the update, and the phone returns to the state it was in, the surveyor should continue to provide corresponding services for free. |
|
||||||
|
|
||||||
Surveyors reserve the right of final interpretation. |
|
||||||
</agreements> |
|
@ -1,781 +0,0 @@ |
|||||||
package com.bingce.controlnetwork.activity.user; |
|
||||||
|
|
||||||
import android.Manifest; |
|
||||||
import android.annotation.SuppressLint; |
|
||||||
import android.app.ProgressDialog; |
|
||||||
import android.content.DialogInterface; |
|
||||||
import android.content.Intent; |
|
||||||
import android.content.pm.PackageManager; |
|
||||||
import android.graphics.Bitmap; |
|
||||||
import android.graphics.Color; |
|
||||||
import android.net.Uri; |
|
||||||
import android.os.Bundle; |
|
||||||
import android.text.Editable; |
|
||||||
import android.text.TextWatcher; |
|
||||||
import android.util.Log; |
|
||||||
import android.view.LayoutInflater; |
|
||||||
import android.view.Menu; |
|
||||||
import android.view.MenuItem; |
|
||||||
import android.view.View; |
|
||||||
import android.widget.Button; |
|
||||||
import android.widget.ImageView; |
|
||||||
import android.widget.TextView; |
|
||||||
|
|
||||||
import androidx.annotation.NonNull; |
|
||||||
import androidx.annotation.Nullable; |
|
||||||
import androidx.appcompat.app.AlertDialog; |
|
||||||
import androidx.appcompat.widget.Toolbar; |
|
||||||
import androidx.core.app.ActivityCompat; |
|
||||||
import androidx.core.content.ContextCompat; |
|
||||||
|
|
||||||
import com.afollestad.materialdialogs.DialogAction; |
|
||||||
import com.afollestad.materialdialogs.MaterialDialog; |
|
||||||
import com.afollestad.materialdialogs.internal.MDButton; |
|
||||||
import com.bingce.AppChannel; |
|
||||||
import com.bingce.controlapphelper.util.SettingValueUtil; |
|
||||||
import com.bingce.controlnetwork.App; |
|
||||||
import com.bingce.controlnetwork.R; |
|
||||||
import com.bingce.controlnetwork.databinding.DialogEditNicknameBinding; |
|
||||||
import com.bingce.controlnetwork.ui.WechatImagePicker; |
|
||||||
import com.bingce.utils.DateUtils; |
|
||||||
import com.bingce.utils.FileUtil; |
|
||||||
import com.bingce.utils.LCDeviceUtil; |
|
||||||
import com.bingce.utils.ServiceDateUtils; |
|
||||||
import com.bingce.utils.ValidateUtil; |
|
||||||
import com.bingce.utils.VipManager; |
|
||||||
import com.bumptech.glide.Glide; |
|
||||||
import com.leon.lib.settingview.LSettingItem; |
|
||||||
import com.qingmei2.rximagepicker.core.RxImagePicker; |
|
||||||
import com.qingmei2.rximagepicker.entity.Result; |
|
||||||
import com.qingmei2.rximagepicker_extension.MimeType; |
|
||||||
import com.qingmei2.rximagepicker_extension_wechat.WechatConfigrationBuilder; |
|
||||||
import com.qingmei2.rximagepicker_extension_wechat.ui.WechatImagePickerFragment; |
|
||||||
import com.yalantis.ucrop.UCrop; |
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull; |
|
||||||
import org.polaric.colorful.ColorfulActivity; |
|
||||||
|
|
||||||
import java.io.File; |
|
||||||
import java.io.FileNotFoundException; |
|
||||||
import java.io.IOException; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
import blankj.utilcode.util.StringUtils; |
|
||||||
import blankj.utilcode.util.ToastUtils; |
|
||||||
import blankj.utilcode.util.Utils; |
|
||||||
import cn.leancloud.LCFile; |
|
||||||
import cn.leancloud.LCObject; |
|
||||||
import cn.leancloud.LCQuery; |
|
||||||
import cn.leancloud.LCUser; |
|
||||||
import de.hdodenhof.circleimageview.CircleImageView; |
|
||||||
import id.zelory.compressor.Compressor; |
|
||||||
import io.reactivex.Observer; |
|
||||||
import io.reactivex.disposables.Disposable; |
|
||||||
import io.reactivex.functions.Consumer; |
|
||||||
|
|
||||||
public class UserInfoActivity extends ColorfulActivity { |
|
||||||
private static final String TAG = "UserInfoActivity"; |
|
||||||
private static final int REQUEST_CODE_ASK_CAMERA = 166; |
|
||||||
private static final int REQUEST_CODE_UPDATE_USER_INFO = 11; |
|
||||||
private Toolbar mToolbar; |
|
||||||
private CircleImageView avatarImageView; |
|
||||||
private TextView tv_nick_name; |
|
||||||
private ImageView tv_nick_name_edit; |
|
||||||
private MDButton mPositiveAction; |
|
||||||
private LSettingItem item_phone, item_email, item_user_level, item_expiration, item_bound_device, item_control_level, item_control_expiration; |
|
||||||
private WechatImagePicker rxImagePicker; |
|
||||||
private Button btn_log_out, btn_opening_renewal; |
|
||||||
private ProgressDialog progressDialog; |
|
||||||
private boolean buy = false; |
|
||||||
|
|
||||||
@Override |
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) { |
|
||||||
super.onCreate(savedInstanceState); |
|
||||||
setContentView(R.layout.activity_user_info); |
|
||||||
mToolbar = findViewById(R.id.toolbar); |
|
||||||
setSupportActionBar(mToolbar); |
|
||||||
if (getSupportActionBar() != null) |
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
|
||||||
|
|
||||||
buy = getIntent().getBooleanExtra("buy", false); |
|
||||||
|
|
||||||
rxImagePicker = RxImagePicker.create(WechatImagePicker.class); |
|
||||||
|
|
||||||
avatarImageView = findViewById(R.id.activity_user_info_avatar_image); |
|
||||||
tv_nick_name = findViewById(R.id.activity_user_info_nick_name); |
|
||||||
tv_nick_name_edit = findViewById(R.id.activity_user_info_nick_name_edit); |
|
||||||
item_phone = findViewById(R.id.activity_user_info_item_phone); |
|
||||||
item_email = findViewById(R.id.activity_user_info_item_email); |
|
||||||
item_user_level = findViewById(R.id.activity_user_info_item_user_level); |
|
||||||
item_expiration = findViewById(R.id.activity_user_info_item_expiration_date); |
|
||||||
item_bound_device = findViewById(R.id.activity_user_info_item_bound_device); |
|
||||||
item_control_level = findViewById(R.id.activity_user_info_item_control_level); |
|
||||||
item_control_expiration = findViewById(R.id.activity_user_info_item_control_expiration_date); |
|
||||||
btn_opening_renewal = findViewById(R.id.activity_user_info_btn_opening_renewal); |
|
||||||
btn_log_out = findViewById(R.id.activity_user_info_btn_log_out); |
|
||||||
|
|
||||||
updateUserInfo(); |
|
||||||
|
|
||||||
avatarImageView.setOnClickListener(new View.OnClickListener() { |
|
||||||
@Override |
|
||||||
public void onClick(View v) { |
|
||||||
showProfileAvatarChangeDialog(); |
|
||||||
} |
|
||||||
}); |
|
||||||
tv_nick_name.setOnClickListener(new View.OnClickListener() { |
|
||||||
@Override |
|
||||||
public void onClick(View v) { |
|
||||||
showEditNicknameDialog(); |
|
||||||
} |
|
||||||
}); |
|
||||||
tv_nick_name_edit.setOnClickListener(new View.OnClickListener() { |
|
||||||
@Override |
|
||||||
public void onClick(View v) { |
|
||||||
showEditNicknameDialog(); |
|
||||||
} |
|
||||||
}); |
|
||||||
item_phone.setOnSettingItemClick(new LSettingItem.onSettingItemClick() { |
|
||||||
@Override |
|
||||||
public void click(boolean isChecked) { |
|
||||||
if (!LCUser.getCurrentUser().isMobilePhoneVerified()) { |
|
||||||
// Intent intent = new Intent(Utils.getApp(), MobilePhoneVerifyActivity.class);
|
|
||||||
// startActivity(intent);
|
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
btn_log_out.setOnClickListener(new View.OnClickListener() { |
|
||||||
@Override |
|
||||||
public void onClick(View v) { |
|
||||||
LCUser.logOut(); |
|
||||||
ToastUtils.showShort(R.string.log_out); |
|
||||||
VipManager.getInstance().controlSdkRefresh(UserInfoActivity.this, ((App) Utils.getApp()).registerCodeV2, null); |
|
||||||
((App) Utils.getApp()).isUserStatusChanged = true;//返回MainActivity时updateHeaderResult
|
|
||||||
finish(); |
|
||||||
} |
|
||||||
}); |
|
||||||
btn_opening_renewal.setOnClickListener(new View.OnClickListener() { |
|
||||||
@Override |
|
||||||
public void onClick(View v) { |
|
||||||
if (AppChannel.customChannel != AppChannel.CUSTOM_CONTROL_PUBLIC) { |
|
||||||
new AlertDialog.Builder(UserInfoActivity.this) |
|
||||||
.setTitle(R.string.hint) |
|
||||||
.setMessage("定制版本无法续费,只能以绑定手机形式使用") |
|
||||||
.setPositiveButton(R.string.i_know, null) |
|
||||||
.show(); |
|
||||||
} else if (LCUser.getCurrentUser().getInt("level") == 0 || LCUser.getCurrentUser().getInt("level") == 1) { |
|
||||||
startActivityForResult(new Intent(UserInfoActivity.this, OpeningRenewalVipActivity.class), REQUEST_CODE_UPDATE_USER_INFO); |
|
||||||
} else { |
|
||||||
ToastUtils.showShort("当前会员模式不支持续费,请联系开发者"); |
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
item_bound_device.setOnSettingItemClick(new LSettingItem.onSettingItemClick() { |
|
||||||
@Override |
|
||||||
public void click(boolean isChecked) { |
|
||||||
unbind(); |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
if (buy) { |
|
||||||
btn_opening_renewal.performClick(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
private void unbind() { |
|
||||||
if (LCUser.getCurrentUser() != null) { |
|
||||||
progressDialog = new ProgressDialog(UserInfoActivity.this); |
|
||||||
progressDialog.setMessage(getString(R.string.please_wait)); |
|
||||||
progressDialog.setCanceledOnTouchOutside(false); |
|
||||||
progressDialog.show(); |
|
||||||
|
|
||||||
ServiceDateUtils.getServerDate(new DateUtils.OnServerDateCallBack() { |
|
||||||
@Override |
|
||||||
public void get(Date serverDate) { |
|
||||||
if (isFinishing()) return; |
|
||||||
//查询条件为:查询今年开始时间,查询开年来的解绑次数
|
|
||||||
Date startOfAYear = DateUtils.addDayOfMonth(serverDate, -365, false, false); |
|
||||||
|
|
||||||
LCQuery<LCObject> unbindDeviceQuery = new LCQuery<>("UnbindDevice"); |
|
||||||
unbindDeviceQuery.whereEqualTo("user", LCUser.getCurrentUser()); |
|
||||||
unbindDeviceQuery.limit(15) |
|
||||||
.whereGreaterThan("updatedAt", startOfAYear) |
|
||||||
.findInBackground().subscribe(new Observer<List<LCObject>>() { |
|
||||||
@Override |
|
||||||
public void onSubscribe(Disposable d) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onNext(List<LCObject> avObjects) { |
|
||||||
progressDialog.dismiss(); |
|
||||||
if (avObjects != null) { |
|
||||||
int totalTimes = 0; |
|
||||||
if (LCUser.getCurrentUser().getInt("level") == 1) { |
|
||||||
totalTimes = 5; |
|
||||||
} else if (LCUser.getCurrentUser().getInt("level") == 10) { |
|
||||||
totalTimes = 10; |
|
||||||
} |
|
||||||
final int leftTimes = Math.max(totalTimes - avObjects.size(), 0); |
|
||||||
new MaterialDialog.Builder(UserInfoActivity.this) |
|
||||||
.title(R.string.unbind_device) |
|
||||||
.content(getString(R.string.number_of_untying_opportunities_at_your_membership_level) + ":" + totalTimes + "\n" |
|
||||||
+ getString(R.string.your_remaining_untying_times_remain) + ":" + leftTimes) |
|
||||||
.positiveText(R.string.unbind_device) |
|
||||||
.onPositive(new MaterialDialog.SingleButtonCallback() { |
|
||||||
@Override |
|
||||||
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { |
|
||||||
if (leftTimes > 0) { |
|
||||||
progressDialog = new ProgressDialog(UserInfoActivity.this); |
|
||||||
progressDialog.setMessage(getString(R.string.please_wait)); |
|
||||||
progressDialog.setCanceledOnTouchOutside(false); |
|
||||||
progressDialog.show(); |
|
||||||
|
|
||||||
LCObject unbindDevice = new LCObject("UnbindDevice"); |
|
||||||
unbindDevice.put("user", LCUser.getCurrentUser()); |
|
||||||
if (LCUser.getCurrentUser().get("controlBoundDevice") != null) |
|
||||||
unbindDevice.put("oldDevice", LCUser.getCurrentUser().get("controlBoundDevice")); |
|
||||||
unbindDevice.put("success", true); |
|
||||||
unbindDevice.saveInBackground().subscribe(new Observer<LCObject>() { |
|
||||||
@Override |
|
||||||
public void onSubscribe(Disposable d) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onNext(LCObject avObject) { |
|
||||||
LCUser.getCurrentUser().remove("controlBoundDevice"); |
|
||||||
LCUser.getCurrentUser().saveInBackground().subscribe(new Observer<LCObject>() { |
|
||||||
@Override |
|
||||||
public void onSubscribe(Disposable d) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onNext(LCObject avObject) { |
|
||||||
if (VipManager.getInstance().isControlBoundDevice) { |
|
||||||
LCUser.logOut(); |
|
||||||
VipManager.getInstance().controlSdkRefresh(UserInfoActivity.this, ((App) Utils.getApp()).registerCodeV2, new VipManager.OnSdkRefreshListener() { |
|
||||||
@Override |
|
||||||
public void onRefreshSuccess() { |
|
||||||
progressDialog.dismiss(); |
|
||||||
new MaterialDialog.Builder(UserInfoActivity.this) |
|
||||||
.title(R.string.unbind_device_success) |
|
||||||
.content(R.string.unbind_device_success_next_to_do) |
|
||||||
.positiveText(R.string.i_know) |
|
||||||
.dismissListener(new DialogInterface.OnDismissListener() { |
|
||||||
@Override |
|
||||||
public void onDismiss(DialogInterface dialog) { |
|
||||||
((App) Utils.getApp()).isUserStatusChanged = true;//返回MainActivity时updateHeaderResult
|
|
||||||
finish(); |
|
||||||
} |
|
||||||
}) |
|
||||||
.show(); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onRefreshFailed(int errorCode) { |
|
||||||
progressDialog.dismiss(); |
|
||||||
} |
|
||||||
}); |
|
||||||
} else { |
|
||||||
LCDeviceUtil.updateDeviceInfo("controlnetwork", ((App) Utils.getApp()).registerCodeV2, new LCDeviceUtil.OnDeviceUpdateListener() { |
|
||||||
@Override |
|
||||||
public void onUpdateSuccess() { |
|
||||||
VipManager.getInstance().controlSdkRefresh(UserInfoActivity.this, ((App) Utils.getApp()).registerCodeV2, new VipManager.OnSdkRefreshListener() { |
|
||||||
@Override |
|
||||||
public void onRefreshSuccess() { |
|
||||||
progressDialog.dismiss(); |
|
||||||
item_bound_device.setRightText(VipManager.getInstance().boundName); |
|
||||||
ToastUtils.showShort(R.string.unbind_device_success); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onRefreshFailed(int errorCode) { |
|
||||||
progressDialog.dismiss(); |
|
||||||
ToastUtils.showShort(getString(R.string.error_code) + ":" + errorCode); |
|
||||||
} |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onUpdateFailed() { |
|
||||||
progressDialog.dismiss(); |
|
||||||
} |
|
||||||
}); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onError(Throwable e) { |
|
||||||
progressDialog.dismiss(); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onComplete() { |
|
||||||
|
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onError(Throwable e) { |
|
||||||
progressDialog.dismiss(); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onComplete() { |
|
||||||
|
|
||||||
} |
|
||||||
}); |
|
||||||
} else { |
|
||||||
ToastUtils.showLong(R.string.your_remaining_untying_times_remain_is_zero); |
|
||||||
} |
|
||||||
} |
|
||||||
}) |
|
||||||
.negativeText(R.string.cancel) |
|
||||||
.show(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onError(Throwable e) { |
|
||||||
progressDialog.dismiss(); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onComplete() { |
|
||||||
|
|
||||||
} |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void error(Throwable throwable) { |
|
||||||
progressDialog.dismiss(); |
|
||||||
Log.d("error", "unbind_device"); |
|
||||||
ToastUtils.showShort(R.string.get_server_date_failed); |
|
||||||
} |
|
||||||
}); |
|
||||||
} else { |
|
||||||
ToastUtils.showShort(R.string.you_are_not_vip_no_need_unbind); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 刷新用户信息 |
|
||||||
*/ |
|
||||||
private void updateUserInfo() { |
|
||||||
if (LCUser.getCurrentUser() != null) { |
|
||||||
if (LCUser.getCurrentUser().getMobilePhoneNumber() != null) |
|
||||||
item_phone.setRightText(LCUser.getCurrentUser().getMobilePhoneNumber()); |
|
||||||
if (LCUser.getCurrentUser().getEmail() != null) |
|
||||||
item_email.setRightText(LCUser.getCurrentUser().getEmail()); |
|
||||||
if (VipManager.getInstance().controlBoundName != null) |
|
||||||
item_bound_device.setRightText(VipManager.getInstance().controlBoundName); |
|
||||||
|
|
||||||
fetchNickNameAndAvatar(); |
|
||||||
|
|
||||||
if (VipManager.getInstance().checkReg()) { |
|
||||||
item_user_level.setRightText(getString(R.string.bound_device)); |
|
||||||
item_expiration.setVisibility(View.GONE); |
|
||||||
} else if (VipManager.getInstance().level > 0) { |
|
||||||
item_expiration.setVisibility(View.VISIBLE); |
|
||||||
if (VipManager.getInstance().expireDate != null) |
|
||||||
item_expiration.setRightText(DateUtils.toFull(VipManager.getInstance().expireDate)); |
|
||||||
if (VipManager.getInstance().isInExpireDate) { |
|
||||||
switch (VipManager.getInstance().level) { |
|
||||||
case 1: |
|
||||||
item_user_level.setRightText(getString(R.string.user_level_1)); |
|
||||||
break; |
|
||||||
case 10: |
|
||||||
item_user_level.setRightText(getString(R.string.surveyor_life_vip)); |
|
||||||
break; |
|
||||||
default: |
|
||||||
item_user_level.setRightText(getString(R.string.user_level_unknown)); |
|
||||||
} |
|
||||||
} else { |
|
||||||
item_user_level.setRightText(getString(R.string.vip_expired)); |
|
||||||
} |
|
||||||
} else { |
|
||||||
item_user_level.setRightText(getString(R.string.user_level_0)); |
|
||||||
item_expiration.setVisibility(View.GONE); |
|
||||||
} |
|
||||||
if (VipManager.getInstance().controlLevel > 0) { |
|
||||||
item_control_level.setVisibility(View.VISIBLE); |
|
||||||
item_control_expiration.setVisibility(View.VISIBLE); |
|
||||||
item_control_expiration.setRightText(DateUtils.toFull(VipManager.getInstance().controlExpireDate)); |
|
||||||
if (VipManager.getInstance().isControlInExpireDate) { |
|
||||||
switch (VipManager.getInstance().controlLevel) { |
|
||||||
case 1: |
|
||||||
case 2: |
|
||||||
item_control_level.setRightText(getString(R.string.user_level_try)); |
|
||||||
break; |
|
||||||
case 3: |
|
||||||
item_control_level.setRightText(getString(R.string.user_level_control_pro)); |
|
||||||
break; |
|
||||||
} |
|
||||||
} else { |
|
||||||
item_control_level.setRightText(getString(R.string.vip_expired)); |
|
||||||
} |
|
||||||
} |
|
||||||
} else { |
|
||||||
ToastUtils.showShort(R.string.not_log_in); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public boolean onCreateOptionsMenu(Menu menu) { |
|
||||||
getMenuInflater().inflate(R.menu.menu_activity_user_info, menu); |
|
||||||
return super.onCreateOptionsMenu(menu); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public boolean onOptionsItemSelected(MenuItem item) { |
|
||||||
switch (item.getItemId()) { |
|
||||||
case android.R.id.home: |
|
||||||
finish(); |
|
||||||
break; |
|
||||||
case R.id.menu_activity_user_info_redeem_code: |
|
||||||
if (AppChannel.customChannel != AppChannel.CUSTOM_CONTROL_PUBLIC) { |
|
||||||
new AlertDialog.Builder(UserInfoActivity.this) |
|
||||||
.setTitle(R.string.hint) |
|
||||||
.setMessage("定制版本无法续费,只能以绑定手机形式使用") |
|
||||||
.setPositiveButton(R.string.i_know, null) |
|
||||||
.show(); |
|
||||||
} else if (LCUser.getCurrentUser().getInt("level") == 0 || LCUser.getCurrentUser().getInt("level") == 1) { |
|
||||||
startActivityForResult(new Intent(UserInfoActivity.this, RedeemVipActivity.class), REQUEST_CODE_UPDATE_USER_INFO); |
|
||||||
} else { |
|
||||||
ToastUtils.showShort("当前会员模式不支持续费,请联系开发者"); |
|
||||||
} |
|
||||||
break; |
|
||||||
} |
|
||||||
return super.onOptionsItemSelected(item); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { |
|
||||||
if (grantResults.length > 0) { |
|
||||||
if (requestCode == REQUEST_CODE_ASK_CAMERA) { |
|
||||||
if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { |
|
||||||
pickByTake(); |
|
||||||
} else { |
|
||||||
ToastUtils.showShort(getString(R.string.please_granted_camera_permission)); |
|
||||||
} |
|
||||||
} else { |
|
||||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public void onActivityResult(int requestCode, int resultCode, Intent data) { |
|
||||||
super.onActivityResult(requestCode, resultCode, data); |
|
||||||
if (resultCode == RESULT_OK) { |
|
||||||
switch (requestCode) { |
|
||||||
case REQUEST_CODE_UPDATE_USER_INFO: |
|
||||||
VipManager.getInstance().controlSdkRefresh(UserInfoActivity.this, ((App) Utils.getApp()).registerCodeV2, new VipManager.OnSdkRefreshListener() { |
|
||||||
@Override |
|
||||||
public void onRefreshSuccess() { |
|
||||||
updateUserInfo(); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onRefreshFailed(int errorCode) { |
|
||||||
ToastUtils.showShort(getString(R.string.error_code) + ":" + errorCode); |
|
||||||
} |
|
||||||
}); |
|
||||||
break; |
|
||||||
case UCrop.REQUEST_CROP: |
|
||||||
final Uri resultUri = UCrop.getOutput(data); |
|
||||||
try { |
|
||||||
File compressedImage = new Compressor(UserInfoActivity.this) |
|
||||||
.setMaxWidth(256) |
|
||||||
.setMaxHeight(256) |
|
||||||
.setQuality(50) |
|
||||||
.setCompressFormat(Bitmap.CompressFormat.JPEG) |
|
||||||
.compressToFile(new File(FileUtil.getRealPathFromUri(resultUri))); |
|
||||||
|
|
||||||
updateProfileAvatar(compressedImage.getAbsolutePath()); |
|
||||||
} catch (IOException e) { |
|
||||||
e.printStackTrace(); |
|
||||||
} |
|
||||||
break; |
|
||||||
case UCrop.RESULT_ERROR: |
|
||||||
final Throwable cropError = UCrop.getError(data); |
|
||||||
if (cropError != null) |
|
||||||
Log.d("cropError", cropError.getMessage()); |
|
||||||
break; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 编辑昵称 |
|
||||||
*/ |
|
||||||
public void showEditNicknameDialog() { |
|
||||||
if (LCUser.getCurrentUser() == null) { |
|
||||||
ToastUtils.showShort(R.string.not_log_in); |
|
||||||
return; |
|
||||||
} |
|
||||||
DialogEditNicknameBinding dialogEditNicknameBinding = DialogEditNicknameBinding.inflate(LayoutInflater.from(this)); |
|
||||||
MaterialDialog dialog = new MaterialDialog.Builder(this) |
|
||||||
.title(R.string.edit_nickname) |
|
||||||
.customView(dialogEditNicknameBinding.getRoot(), false) |
|
||||||
.onPositive((dialog1, which) -> { |
|
||||||
final String nickname = dialogEditNicknameBinding.metDialogEditNickname.getText().toString(); |
|
||||||
LCUser.getCurrentUser().put("nickname", nickname); |
|
||||||
LCUser.getCurrentUser().saveInBackground().subscribe(); |
|
||||||
ToastUtils.showShort(R.string.edit_nickname_success); |
|
||||||
tv_nick_name.setText(nickname); |
|
||||||
((App) Utils.getApp()).isUserStatusChanged = true;//返回MainActivity时updateHeaderResult
|
|
||||||
}) |
|
||||||
.positiveText(getString(R.string.save)) |
|
||||||
.negativeText(getString(R.string.cancel)) |
|
||||||
.dismissListener(dialog12 -> |
|
||||||
dialogEditNicknameBinding.metDialogEditNickname.clearFocus()) |
|
||||||
.build(); |
|
||||||
mPositiveAction = dialog.getActionButton(DialogAction.POSITIVE); |
|
||||||
|
|
||||||
if (SettingValueUtil.isThemeDark()) { |
|
||||||
dialogEditNicknameBinding.metDialogEditNickname.setMetTextColor(Color.WHITE); |
|
||||||
dialogEditNicknameBinding.metDialogEditNickname.setPrimaryColor(Color.LTGRAY); |
|
||||||
dialogEditNicknameBinding.metDialogEditNickname.setFocusFraction(1.0f); |
|
||||||
dialogEditNicknameBinding.metDialogEditNickname.setMetHintTextColor(Color.GRAY); |
|
||||||
dialogEditNicknameBinding.metDialogEditNickname.setUnderlineColor(Color.GRAY); |
|
||||||
} |
|
||||||
|
|
||||||
TextWatcher watcher = new TextWatcher() { |
|
||||||
@Override |
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) { |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void afterTextChanged(Editable s) { |
|
||||||
String nickname_text = s == null ? "" : s.toString(); |
|
||||||
mPositiveAction.setEnabled(ValidateUtil.isNickName(nickname_text)); |
|
||||||
} |
|
||||||
}; |
|
||||||
|
|
||||||
dialogEditNicknameBinding.metDialogEditNickname.addTextChangedListener(watcher); |
|
||||||
|
|
||||||
dialog.show(); |
|
||||||
mPositiveAction.setEnabled(false); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 编辑头像 |
|
||||||
*/ |
|
||||||
private void showProfileAvatarChangeDialog() { |
|
||||||
new MaterialDialog.Builder(this) |
|
||||||
.title(R.string.change_profile_avatar) |
|
||||||
.positiveText(R.string.pick_by_select) |
|
||||||
.negativeText(R.string.pick_by_take) |
|
||||||
.neutralText(R.string.cancel) |
|
||||||
.onPositive(new MaterialDialog.SingleButtonCallback() { |
|
||||||
@Override |
|
||||||
public void onClick(@NonNull @NotNull MaterialDialog dialog, @NonNull @NotNull DialogAction which) { |
|
||||||
pickBySelect(); |
|
||||||
} |
|
||||||
}) |
|
||||||
.onNegative(new MaterialDialog.SingleButtonCallback() { |
|
||||||
@Override |
|
||||||
public void onClick(@NonNull @NotNull MaterialDialog dialog, @NonNull @NotNull DialogAction which) { |
|
||||||
pickByTake(); |
|
||||||
} |
|
||||||
}) |
|
||||||
.show(); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 相册选择照片 |
|
||||||
*/ |
|
||||||
@SuppressLint("CheckResult") |
|
||||||
public void pickBySelect() { |
|
||||||
rxImagePicker.openGallery(this, new WechatConfigrationBuilder(MimeType.INSTANCE.ofImage(), false) |
|
||||||
.capture(true) |
|
||||||
.maxSelectable(1) |
|
||||||
.countable(true) |
|
||||||
.spanCount(4) |
|
||||||
.countable(false) |
|
||||||
.build()) |
|
||||||
.subscribe(rxImagePickerConsumerOnNext, rxImagePickerConsumerOnError); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 拍照片 |
|
||||||
*/ |
|
||||||
@SuppressLint("CheckResult") |
|
||||||
public void pickByTake() { |
|
||||||
if ((PackageManager.PERMISSION_GRANTED != ContextCompat.checkSelfPermission(Utils.getApp(), Manifest.permission.CAMERA))) { |
|
||||||
ActivityCompat.requestPermissions(UserInfoActivity.this, new String[]{Manifest.permission.CAMERA}, REQUEST_CODE_ASK_CAMERA); |
|
||||||
} else { |
|
||||||
rxImagePicker.openCamera(this).subscribe(rxImagePickerConsumerOnNext, rxImagePickerConsumerOnError); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
Consumer<Result> rxImagePickerConsumerOnNext = new Consumer<Result>() { |
|
||||||
@Override |
|
||||||
public void accept(Result result) throws Exception { |
|
||||||
boolean originalMode = result.getBooleanExtra(WechatImagePickerFragment.EXTRA_ORIGINAL_IMAGE, false); |
|
||||||
// String mimeType = result.getStringExtra(WechatImagePickerFragment.EXTRA_OPTIONAL_MIME_TYPE, "");
|
|
||||||
Log.d(TAG, "select image original:" + originalMode + " , uri path: " + FileUtil.getRealPathFromUri(result.getUri())); |
|
||||||
UCrop.of(result.getUri(), result.getUri()) |
|
||||||
.withAspectRatio(1, 1) |
|
||||||
.withMaxResultSize(256, 256) |
|
||||||
.start(UserInfoActivity.this); |
|
||||||
} |
|
||||||
}; |
|
||||||
|
|
||||||
Consumer<Throwable> rxImagePickerConsumerOnError = new Consumer<Throwable>() { |
|
||||||
@Override |
|
||||||
public void accept(Throwable throwable) { |
|
||||||
ToastUtils.showShort("打开图片失败"); |
|
||||||
} |
|
||||||
}; |
|
||||||
|
|
||||||
/** |
|
||||||
* 更新云端头像 |
|
||||||
* |
|
||||||
* @param path |
|
||||||
*/ |
|
||||||
private void updateProfileAvatar(String path) { |
|
||||||
try { |
|
||||||
final LCFile file = LCFile.withAbsoluteLocalPath("avatar.jpg", path); |
|
||||||
if (LCUser.getCurrentUser() != null) { |
|
||||||
LCUser.getCurrentUser().put("avatar", file); |
|
||||||
LCUser.getCurrentUser().saveInBackground().subscribe(new Observer<LCObject>() { |
|
||||||
@Override |
|
||||||
public void onSubscribe(Disposable d) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onNext(LCObject lcObject) { |
|
||||||
Glide.with(UserInfoActivity.this).load(file.getUrl()).into(avatarImageView); |
|
||||||
ToastUtils.showShort(R.string.update_avatar_success); |
|
||||||
((App) Utils.getApp()).isUserStatusChanged = true;//返回MainActivity时updateHeaderResult
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onError(Throwable e) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onComplete() { |
|
||||||
|
|
||||||
} |
|
||||||
}); |
|
||||||
} else { |
|
||||||
ToastUtils.showShort(R.string.not_log_in); |
|
||||||
} |
|
||||||
} catch (FileNotFoundException e) { |
|
||||||
e.printStackTrace(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
private void fetchNickNameAndAvatar() { |
|
||||||
if (LCUser.getCurrentUser() != null) { |
|
||||||
String nickname = LCUser.getCurrentUser().getString("nickname"); |
|
||||||
LCFile avatarFile = LCUser.getCurrentUser().getLCFile("avatar"); |
|
||||||
if (!StringUtils.isEmpty(nickname)) { |
|
||||||
tv_nick_name.setText(nickname); |
|
||||||
if (avatarFile == null) { |
|
||||||
avatarImageView.setImageResource(R.mipmap.profile_image); |
|
||||||
} else { |
|
||||||
Glide.with(UserInfoActivity.this).load(avatarFile.getUrl()).into(avatarImageView); |
|
||||||
} |
|
||||||
} else { |
|
||||||
LCObject userProfile = LCUser.getCurrentUser().getLCObject("profile"); |
|
||||||
if (userProfile != null) { |
|
||||||
userProfile.fetchInBackground().subscribe(new Observer<LCObject>() { |
|
||||||
@Override |
|
||||||
public void onSubscribe(Disposable d) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onNext(LCObject avObject) { |
|
||||||
if (isFinishing()) return; |
|
||||||
String nickname = avObject.getString("nickname"); |
|
||||||
LCFile avatarFile = avObject.getLCFile("avatar"); |
|
||||||
if (!StringUtils.isEmpty(nickname)) { |
|
||||||
tv_nick_name.setText(nickname); |
|
||||||
if (avatarFile == null) { |
|
||||||
avatarImageView.setImageResource(R.mipmap.profile_image); |
|
||||||
} else { |
|
||||||
Glide.with(UserInfoActivity.this).load(avatarFile.getUrl()).into(avatarImageView); |
|
||||||
} |
|
||||||
//保存到_User,下次不再查Profile
|
|
||||||
LCUser.getCurrentUser().put("nickname", nickname); |
|
||||||
if (avatarFile != null) |
|
||||||
LCUser.getCurrentUser().put("avatar", avatarFile); |
|
||||||
LCUser.getCurrentUser().saveInBackground().subscribe(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onError(Throwable e) { |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onComplete() { |
|
||||||
|
|
||||||
} |
|
||||||
}); |
|
||||||
} else { |
|
||||||
new LCQuery<>("Profile") |
|
||||||
.whereEqualTo("creatorId", LCUser.getCurrentUser().getObjectId()) |
|
||||||
.findInBackground() |
|
||||||
.subscribe(new Observer<List<LCObject>>() { |
|
||||||
@Override |
|
||||||
public void onSubscribe(Disposable d) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onNext(List<LCObject> list) { |
|
||||||
if (isFinishing()) return; |
|
||||||
if (list != null && !list.isEmpty()) { |
|
||||||
String nickname = list.get(0).getString("nickname"); |
|
||||||
LCFile avatarFile = list.get(0).getLCFile("avatar"); |
|
||||||
if (!StringUtils.isEmpty(nickname)) { |
|
||||||
tv_nick_name.setText(nickname); |
|
||||||
if (avatarFile == null) { |
|
||||||
avatarImageView.setImageResource(R.mipmap.profile_image); |
|
||||||
} else { |
|
||||||
Glide.with(UserInfoActivity.this).load(avatarFile.getUrl()).into(avatarImageView); |
|
||||||
} |
|
||||||
|
|
||||||
//保存到_User,下次不再查Profile
|
|
||||||
LCUser.getCurrentUser().put("nickname", nickname); |
|
||||||
if (avatarFile != null) |
|
||||||
LCUser.getCurrentUser().put("avatar", avatarFile); |
|
||||||
LCUser.getCurrentUser().saveInBackground().subscribe(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onError(Throwable e) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onComplete() { |
|
||||||
|
|
||||||
} |
|
||||||
}); |
|
||||||
} |
|
||||||
} |
|
||||||
} else { |
|
||||||
tv_nick_name.setText(getString(R.string.please_log_in_again)); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,21 +0,0 @@ |
|||||||
package com.bingce.controlnetwork.ui; |
|
||||||
|
|
||||||
import android.content.Context; |
|
||||||
|
|
||||||
import com.qingmei2.rximagepicker.entity.Result; |
|
||||||
import com.qingmei2.rximagepicker.entity.sources.Camera; |
|
||||||
import com.qingmei2.rximagepicker.entity.sources.Gallery; |
|
||||||
import com.qingmei2.rximagepicker.ui.ICustomPickerConfiguration; |
|
||||||
import com.qingmei2.rximagepicker_extension_wechat.ui.WechatImagePickerActivity; |
|
||||||
|
|
||||||
import io.reactivex.Observable; |
|
||||||
|
|
||||||
public interface WechatImagePicker { |
|
||||||
|
|
||||||
@Gallery(componentClazz = WechatImagePickerActivity.class, |
|
||||||
openAsFragment = false) |
|
||||||
Observable<Result> openGallery(Context context, ICustomPickerConfiguration config); |
|
||||||
|
|
||||||
@Camera |
|
||||||
Observable<Result> openCamera(Context context); |
|
||||||
} |
|
@ -0,0 +1,67 @@ |
|||||||
|
package com.bingce.controlnetwork.util; |
||||||
|
|
||||||
|
import static com.bingce.utils.RegisterUtil.getOriginalMachineCode; |
||||||
|
|
||||||
|
import android.Manifest; |
||||||
|
import android.content.pm.PackageManager; |
||||||
|
import android.os.Build; |
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat; |
||||||
|
|
||||||
|
import com.bingce.AppChannel; |
||||||
|
import com.bingce.BaseApp; |
||||||
|
import com.bingce.utils.ActivateUtil; |
||||||
|
import com.bingce.utils.AppUtil; |
||||||
|
|
||||||
|
import blankj.utilcode.util.Utils; |
||||||
|
|
||||||
|
public class CheckRegUtil { |
||||||
|
/** |
||||||
|
* 检查注册码是否有效,仅限offline调用 |
||||||
|
* |
||||||
|
* @return |
||||||
|
* @reg_code 激活码 |
||||||
|
*/ |
||||||
|
public static boolean checkReg(String reg_code) { |
||||||
|
if (!((BaseApp) Utils.getApp()).userAgreementAgree) |
||||||
|
return false; |
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {//Q=10,大于安卓10的可能是手薄,不需要检测电话权限
|
||||||
|
if (ContextCompat.checkSelfPermission(Utils.getApp(), Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) { |
||||||
|
// ToastUtils.showShort("为了认证激活信息,请打开读取手机状态权限");
|
||||||
|
return false; |
||||||
|
} |
||||||
|
} |
||||||
|
if (AppChannel.customChannel != AppChannel.CUSTOM_INTERNATIONAL |
||||||
|
&& AppChannel.customChannel != AppChannel.CUSTOM_TERSUS_INTERNATIONAL |
||||||
|
&& AppChannel.customChannel != AppChannel.CUSTOM_PENTAX_INTERNATIONAL |
||||||
|
&& AppChannel.customChannel != AppChannel.CUSTOM_SURVEY_SPACE_INTERNATIONAL |
||||||
|
&& AppChannel.customChannel != AppChannel.CUSTOM_TUNNEL_AUTO_SCAN) { |
||||||
|
if (!AppUtil.isZhCN())//国内发行版本在非简体中文语言下不可用
|
||||||
|
return false; |
||||||
|
} |
||||||
|
if ("".equals(getOriginalMachineCode()) |
||||||
|
|| "SERIALNUMBERunknown".equals(getOriginalMachineCode()) |
||||||
|
|| "SERIALNUMBERnull".equals(getOriginalMachineCode()) |
||||||
|
|| "SERIALNUMBER".equals(getOriginalMachineCode())) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
//开始验证
|
||||||
|
String machineCode = getOriginalMachineCode(); |
||||||
|
String answer; |
||||||
|
if (machineCode != null) { |
||||||
|
answer = ""; |
||||||
|
String md5 = ActivateUtil.encrypt(Utils.getApp(), machineCode, AppChannel.customChannel); |
||||||
|
if (md5 != null) { |
||||||
|
for (int i = 0; i < md5.length(); i++) { |
||||||
|
if (i % 2 == 1) |
||||||
|
answer += md5.charAt(i); |
||||||
|
} |
||||||
|
answer = answer.toUpperCase(); |
||||||
|
return reg_code.equals(answer); |
||||||
|
} else {//如果返回null,说明破解打包了
|
||||||
|
return false; |
||||||
|
} |
||||||
|
} |
||||||
|
return false; |
||||||
|
} |
||||||
|
} |
@ -1,48 +1,47 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|
||||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||||
android:orientation="vertical"> |
android:orientation="vertical" |
||||||
|
android:padding="12dp"> |
||||||
|
|
||||||
<ImageView |
<LinearLayout |
||||||
android:id="@+id/iv" |
android:layout_width="match_parent" |
||||||
android:layout_width="0dp" |
android:layout_height="wrap_content" |
||||||
android:layout_height="0dp" |
android:background="@drawable/round_white_16" |
||||||
android:src="@mipmap/profile_cover" |
android:orientation="vertical"> |
||||||
app:layout_constraintDimensionRatio="h,16:9" |
|
||||||
app:layout_constraintLeft_toLeftOf="parent" |
|
||||||
app:layout_constraintRight_toRightOf="parent" |
|
||||||
app:layout_constraintTop_toTopOf="parent" /> |
|
||||||
|
|
||||||
<LinearLayout |
<LinearLayout |
||||||
android:layout_width="wrap_content" |
android:id="@+id/llAbout" |
||||||
|
android:layout_width="match_parent" |
||||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||||
android:background="@drawable/corners_edit_white_chatui" |
android:gravity="center_vertical" |
||||||
android:orientation="vertical" |
android:orientation="horizontal" |
||||||
android:padding="12dp" |
android:padding="12dp"> |
||||||
app:layout_constraintBottom_toBottomOf="@+id/iv" |
|
||||||
app:layout_constraintLeft_toLeftOf="@+id/iv" |
<ImageView |
||||||
app:layout_constraintRight_toRightOf="@+id/iv" |
android:layout_width="30dp" |
||||||
app:layout_constraintTop_toTopOf="@+id/iv"> |
android:layout_height="30dp" |
||||||
|
android:src="@mipmap/ic_me_about" /> |
||||||
|
|
||||||
<TextView |
<TextView |
||||||
android:id="@+id/tvUnit" |
android:layout_width="0dp" |
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||||
android:text="" |
android:layout_marginStart="12dp" |
||||||
android:textColor="@color/color_333333" |
android:layout_weight="1" |
||||||
android:textSize="16sp" |
android:text="版本号" |
||||||
android:visibility="gone" /> |
android:textColor="@color/text_color_1" |
||||||
|
android:textSize="@dimen/text_size_one" /> |
||||||
|
|
||||||
<TextView |
<TextView |
||||||
android:id="@+id/tvVersion" |
android:id="@+id/tvVersion" |
||||||
android:layout_width="wrap_content" |
android:layout_width="wrap_content" |
||||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||||
android:text="" |
android:textColor="@color/text_color_1" |
||||||
android:textColor="@color/color_999999" |
android:textSize="@dimen/text_size_two" /> |
||||||
android:textSize="14sp" /> |
|
||||||
|
</LinearLayout> |
||||||
|
|
||||||
</LinearLayout> |
</LinearLayout> |
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout> |
</LinearLayout> |
@ -1 +1 @@ |
|||||||
Subproject commit edf00a6ca7b5afe3a544292bf320eea526d2b511 |
Subproject commit 17c41fefdecef36e54da06af009dad14c35fba2a |
Loading…
Reference in new issue