Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
Permit Firebase analytics to be disabled
Browse files Browse the repository at this point in the history
Set up configuration parameters so that analytics can be completely disabled based on the flavor being built
  • Loading branch information
chrisgarrity committed Sep 20, 2021
1 parent d0dc916 commit ad58d57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions android/ScratchJr/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ android {

defaultConfig {
applicationId "org.scratchjr.android"
manifestPlaceholders = [disableAnalytics: "false"]
}

buildTypes {
Expand All @@ -24,6 +25,7 @@ android {
targetSdkVersion 29
versionCode 22
versionName "1.2.11"
manifestPlaceholders = [disableAnalytics: "true"]
}
}

Expand Down
3 changes: 3 additions & 0 deletions android/ScratchJr/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
android:theme="@style/AppTheme"
android:hardwareAccelerated="true"
android:resizeableActivity="false">

<meta-data android:name="firebase_analytics_collection_deactivated" android:value="${disableAnalytics}" />

<provider android:name="ShareContentProvider"
android:grantUriPermissions="true"
android:authorities="${applicationId}.ShareContentProvider">
Expand Down

0 comments on commit ad58d57

Please sign in to comment.