Skip to content

Commit b8ba038

Browse files
committed
【ID871407511】合规修复-升级firebase版本,把firebase数据收集时机放置同意协议之后。
http://tapd.oa.com/NEW_IOT/prong/stories/view/1020393192871407511 Change-Id: Ibec07cc765a6e9dcead2393eec811129976a9152
1 parent 200d595 commit b8ba038

File tree

5 files changed

+24
-15
lines changed

5 files changed

+24
-15
lines changed

app/build.gradle

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ android {
6060
productFlavors {
6161
opensource {
6262
applicationId "com.tencent.iot.explorer.link.opensource"
63-
resValue("string" , "app_name_zh", "腾讯连连开源版")
64-
resValue("string" , "app_name_en", "Tencent LLink (OSS)")
63+
resValue("string", "app_name_zh", "腾讯连连开源版")
64+
resValue("string", "app_name_en", "Tencent LLink (OSS)")
6565
}
6666
//-tencentOfficial {
6767
//- applicationId "com.tencent.iot.explorer.link"
@@ -70,7 +70,7 @@ android {
7070
//-}
7171
}
7272

73-
kotlinOptions { jvmTarget = 1.8}
73+
kotlinOptions { jvmTarget = 1.8 }
7474

7575

7676
buildTypes {
@@ -102,15 +102,20 @@ android {
102102
}
103103
applicationVariants.all { variant ->
104104
variant.outputs.all {
105-
def date = new Date().format("yyyyMMddHH" , TimeZone.getTimeZone("GMT+08"))
106-
if(variant.buildType.name == 'debug') {
105+
def date = new Date().format("yyyyMMddHH", TimeZone.getTimeZone("GMT+08"))
106+
if (variant.buildType.name == 'debug') {
107107
outputFileName = "iot-link-android-debug-${date}.apk"
108108
}
109-
if(variant.buildType.name == 'release') {
109+
if (variant.buildType.name == 'release') {
110110
outputFileName = "iot-link-android-release-${date}.apk"
111111
}
112112
}
113113
}
114+
115+
compileOptions {
116+
sourceCompatibility JavaVersion.VERSION_1_8
117+
targetCompatibility JavaVersion.VERSION_1_8
118+
}
114119
}
115120

116121
dependencies {
@@ -169,12 +174,12 @@ dependencies {
169174
implementation 'com.tencent.iot.explorer:explorer-link-android:+'
170175
}
171176

172-
implementation 'com.google.firebase:firebase-analytics-ktx:17.5.0'
177+
implementation 'com.google.firebase:firebase-analytics-ktx:20.0.2'
173178

174179
// Add the Firebase Crashlytics SDK.
175-
implementation 'com.google.firebase:firebase-crashlytics:17.2.1'
180+
implementation 'com.google.firebase:firebase-crashlytics:18.2.6'
176181

177-
implementation 'com.google.firebase:firebase-perf:19.0.8'
182+
implementation 'com.google.firebase:firebase-perf:20.0.4'
178183

179184
implementation 'com.squareup.picasso:picasso:2.71828'
180185

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
android:theme="@style/AppTheme"
5050
android:usesCleartextTraffic="true"
5151
tools:replace="android:allowBackup">
52+
<!-- 如果您出于某些原因(例如为了在收集数据前征得最终用户的同意)希望暂时停用 Analytics 数据收集功能 -->
53+
<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />
5254
<!-- 请您务必确保终端用户首次安装启动应用时,配置不自动启动推送服务,以确保应用首次安装启动时不会自启推送服务,直到调用了推送服务注册接口 XGPushManager.registerPush() 才会开启 -->
5355
<meta-data
5456
android:name="XG_SERVICE_PULL_UP_OFF"

app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/PrivicyDialogActivity.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package com.tencent.iot.explorer.link.kitlink.activity
22

33
import android.content.Intent
44
import android.text.TextUtils
5+
import com.google.firebase.analytics.FirebaseAnalytics
56
import com.tencent.iot.explorer.link.App
67
import com.tencent.iot.explorer.link.R
7-
import com.tencent.iot.explorer.link.T
88
import com.tencent.iot.explorer.link.core.utils.Utils
99
import com.tencent.iot.explorer.link.customview.dialog.UserAgreeDialog
1010
import com.tencent.iot.explorer.link.kitlink.consts.CommonField
@@ -21,6 +21,7 @@ class PrivicyDialogActivity : BaseActivity() {
2121

2222
override fun initView() {
2323
if (!TextUtils.isEmpty(App.data.getToken())) {
24+
FirebaseAnalytics.getInstance(this).setAnalyticsCollectionEnabled(true)
2425
startActivity(Intent(this, MainActivity::class.java))
2526
return
2627
}
@@ -33,6 +34,7 @@ class PrivicyDialogActivity : BaseActivity() {
3334
}
3435
override fun onOkClicked() {
3536
Utils.setXmlStringValue(this@PrivicyDialogActivity, CommonField.AGREED_RULE_FLAG, CommonField.AGREED_RULE_FLAG, "1")
37+
FirebaseAnalytics.getInstance(this@PrivicyDialogActivity).setAnalyticsCollectionEnabled(true)
3638
finish()
3739
App.toLogin()
3840
}

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ buildscript {
1010
dependencies {
1111
classpath 'com.android.tools.build:gradle:3.5.0'
1212
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13-
classpath 'com.google.gms:google-services:4.3.3'
14-
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
15-
classpath 'com.google.firebase:perf-plugin:1.3.1' // Performance Monitoring plugin
13+
classpath 'com.google.gms:google-services:4.3.10'
14+
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
15+
classpath 'com.google.firebase:perf-plugin:1.4.0' // Performance Monitoring plugin
1616
// NOTE: Do not place your application dependencies here; they belong
1717
// in the individual module build.gradle files
1818
}

sdkdemo/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ dependencies {
118118
implementation 'com.tencent.iot.explorer:explorer-link-android:+'
119119
}
120120

121-
implementation 'com.google.firebase:firebase-analytics-ktx:17.4.3'
121+
implementation 'com.google.firebase:firebase-analytics-ktx:20.0.2'
122122

123123
// Add the Firebase Crashlytics SDK.
124-
implementation 'com.google.firebase:firebase-crashlytics:17.0.1'
124+
implementation 'com.google.firebase:firebase-crashlytics:18.2.6'
125125

126126
// implementation 'com.google.firebase:firebase-perf:19.0.7'
127127
implementation 'com.alibaba:fastjson:1.2.73'

0 commit comments

Comments
 (0)