File tree Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,22 @@ project.ext {
63
63
])
64
64
}
65
65
66
+ apply from : file(" ./../../app/android/firebase-json.gradle" )
67
+
68
+ def autoCollectionEnabled = " true"
69
+
70
+ if (rootProject. ext && rootProject. ext. firebaseJson) {
71
+ if (rootProject. ext. firebaseJson. isFlagEnabled(" analytics_auto_collection_enabled" ) == false ) {
72
+ autoCollectionEnabled = " false"
73
+ }
74
+ }
75
+
66
76
android {
67
77
defaultConfig {
68
78
multiDexEnabled true
79
+ manifestPlaceholders = [
80
+ firebaseJsonAutoCollectionEnabled : autoCollectionEnabled
81
+ ]
69
82
}
70
83
lintOptions {
71
84
disable ' GradleCompatible'
Original file line number Diff line number Diff line change 5
5
<uses-permission android : name =" android.permission.ACCESS_NETWORK_STATE" />
6
6
<uses-permission android : name =" android.permission.INTERNET" />
7
7
<uses-permission android : name =" android.permission.WAKE_LOCK" />
8
+
9
+ <application >
10
+ <meta-data
11
+ android : name =" firebase_analytics_collection_enabled"
12
+ android : value =" ${firebaseJsonAutoCollectionEnabled}" />
13
+ </application >
8
14
</manifest >
Original file line number Diff line number Diff line change @@ -86,6 +86,14 @@ if [[ ${_SEARCH_RESULT} ]]; then
86
86
_PLIST_ENTRY_TYPES+=(" string" )
87
87
_PLIST_ENTRY_VALUES+=(" $_JSON_OUTPUT_BASE64 " )
88
88
89
+ # config.analytics_auto_collection_enabled
90
+ _ANALYTICS_AUTO_COLLECTION=$( getFirebaseJsonKeyValue " $_JSON_OUTPUT_RAW " " analytics_auto_collection_enabled" )
91
+ if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then
92
+ _PLIST_ENTRY_KEYS+=(" FIREBASE_ANALYTICS_COLLECTION_ENABLED" )
93
+ _PLIST_ENTRY_TYPES+=(" bool" )
94
+ _PLIST_ENTRY_VALUES+=(" $( jsonBoolToYesNo " $_ANALYTICS_AUTO_COLLECTION " ) " )
95
+ fi
96
+
89
97
# config.messaging_auto_init_enabled
90
98
_MESSAGING_AUTO_INIT=$( getFirebaseJsonKeyValue " $_JSON_OUTPUT_RAW " " messaging_auto_init_enabled" )
91
99
if [[ $_MESSAGING_AUTO_INIT ]]; then
Original file line number Diff line number Diff line change 15
15
"messaging_android_notification_color" : " @color/hotpink" ,
16
16
"messaging_ios_auto_register_for_remote_messages" : true ,
17
17
18
- "TODO_analytics_auto_collection_enabled" : true ,
18
+ "analytics_auto_collection_enabled" : true ,
19
+
19
20
"TODO_perf_auto_collection_enabled" : true ,
20
21
"TODO_in_app_messaging_auto_collection_enabled" : true ,
21
22
"TODO_database_persistence_enabled" : true ,
You can’t perform that action at this time.
0 commit comments