From 411e7a92c97ba7e0cbc2db76de999d520bd2a8c4 Mon Sep 17 00:00:00 2001 From: Michael Huebler Date: Mon, 10 Aug 2020 06:34:17 +0200 Subject: [PATCH] Added playstore publication_version flavor. This flavor avoids references to Corona in the app name etc. --- corona-warn-companion/build.gradle | 16 +++++++++++++++- .../src/main/AndroidManifest.xml | 18 +++++++++--------- .../src/main/assets/notice.md | 4 ++-- .../tosl/coronawarncompanion/MainActivity.java | 2 +- .../src/main/res/values-de/strings.xml | 12 +++++------- .../src/main/res/values/strings.xml | 12 +++++------- 6 files changed, 37 insertions(+), 27 deletions(-) diff --git a/corona-warn-companion/build.gradle b/corona-warn-companion/build.gradle index e628ed1..41635d5 100644 --- a/corona-warn-companion/build.gradle +++ b/corona-warn-companion/build.gradle @@ -48,7 +48,6 @@ android { buildToolsVersion "29.0.3" defaultConfig { - applicationId 'org.tosl.coronawarncompanion' minSdkVersion 23 targetSdkVersion 29 versionName androidGitVersion.name() @@ -78,6 +77,21 @@ android { testOptions { unitTests.returnDefaultValues = true } + flavorDimensions 'publication_version' + productFlavors { + github { + dimension 'publication_version' + applicationId 'org.tosl.coronawarncompanion' + resValue "string", "app_name", "Corona-Warn-Companion" + resValue "string", "about_name", "Corona-\\nWarn-\\nCompanion" + } + playstore { + dimension 'publication_version' + applicationId 'org.tosl.warnappcompanion' + resValue "string", "app_name", "Warn-App-Companion" + resValue "string", "about_name", "Warn-\\nApp-\\nCompanion" + } + } } repositories { diff --git a/corona-warn-companion/src/main/AndroidManifest.xml b/corona-warn-companion/src/main/AndroidManifest.xml index 7ece288..9c4710e 100644 --- a/corona-warn-companion/src/main/AndroidManifest.xml +++ b/corona-warn-companion/src/main/AndroidManifest.xml @@ -7,17 +7,17 @@ @@ -26,20 +26,20 @@ - + + android:value="org.tosl.coronawarncompanion.MainActivity" /> - + + android:value="org.tosl.coronawarncompanion.MainActivity" /> - + + android:value="org.tosl.coronawarncompanion.MainActivity" /> \ No newline at end of file diff --git a/corona-warn-companion/src/main/assets/notice.md b/corona-warn-companion/src/main/assets/notice.md index 49a479a..53486f8 100644 --- a/corona-warn-companion/src/main/assets/notice.md +++ b/corona-warn-companion/src/main/assets/notice.md @@ -1,5 +1,5 @@ -Notices for Corona-Warn-Companion -================================= +Notices for this App +==================== Corona-Warn-Companion. An app that shows COVID-19 Exposure Notifications details. Copyright (C) 2020 Michael Huebler and other contributors. diff --git a/corona-warn-companion/src/main/java/org/tosl/coronawarncompanion/MainActivity.java b/corona-warn-companion/src/main/java/org/tosl/coronawarncompanion/MainActivity.java index aac20b0..95bde5d 100644 --- a/corona-warn-companion/src/main/java/org/tosl/coronawarncompanion/MainActivity.java +++ b/corona-warn-companion/src/main/java/org/tosl/coronawarncompanion/MainActivity.java @@ -154,7 +154,7 @@ protected void onCreate(Bundle savedInstanceState) { if (!DEMO_MODE) { actionBar.setTitle(R.string.title_activity_main); } else { - actionBar.setTitle(R.string.title_activity_main_demo); + actionBar.setTitle(getString(R.string.title_activity_main)+getString(R.string.title_activity_main_demo_suffix)); } } diff --git a/corona-warn-companion/src/main/res/values-de/strings.xml b/corona-warn-companion/src/main/res/values-de/strings.xml index 6f9f21c..1001681 100644 --- a/corona-warn-companion/src/main/res/values-de/strings.xml +++ b/corona-warn-companion/src/main/res/values-de/strings.xml @@ -1,6 +1,5 @@ - Corona-Warn-Companion Risiko-Begegnung am %s: Risiko-Begegnungen am %s: @@ -34,17 +33,16 @@ Demo Modus an/aus Open Source Software Lizenzen OSS Lizenzen - Corona Warn Companion - Corona Warn Companion DEMO - Corona Warn Companion + @string/app_name + " DEMO" + @string/app_name DEMO Beispiel-Details Weitere Open Source Software Lizenzen Weitere OSS Lizenzen Im Moment kann der Modus leider nicht gewechselt werden.\nBitte warte, bis alle Berechnungen abgeschlossen sind. - FEHLER!\n\Begegnungen konnten nicht ausgelesen werden.\nSind Exposure Notifications eingeschaltet?\nHast Du der Corona Warn Companion App ROOT-Rechte gegeben? + FEHLER!\n\Begegnungen konnten nicht ausgelesen werden.\nSind Exposure Notifications eingeschaltet?\nHast Du dieser App ROOT-Rechte gegeben? Fehler!\n\nEs gab ein Problem beim Herunterladen der Diagnoseschlüssel.\nFunktioniert Deine Internetverbindung? Über diese App - Über Corona Warn Companion - Corona-\nWarn-\nCompanion + Über diese App Version\n%s (%d, %s) \ No newline at end of file diff --git a/corona-warn-companion/src/main/res/values/strings.xml b/corona-warn-companion/src/main/res/values/strings.xml index 885e760..e51d17f 100644 --- a/corona-warn-companion/src/main/res/values/strings.xml +++ b/corona-warn-companion/src/main/res/values/strings.xml @@ -8,7 +8,6 @@ %d risk encounter. Tap to see details… %d risk encounters. Tap to see details… - Corona-Warn-Companion No risk encounters found. %d encounters scanned (%s-%s). %d diagnosis keys downloaded." @@ -34,17 +33,16 @@ Toggle Demo Mode Open Source Software Licenses OSS Licenses - Corona Warn Companion - Corona Warn Companion DEMO - Corona Warn Companion + @string/app_name + DEMO + @string/app_name DEMO sample details Further Open Source Software Licenses Further OSS Licenses Sorry, at the moment we cannot switch modes.\nPlease wait until all operations have finished. - ERROR!\n\nNo encounters could be extracted.\nAre Exposure Notifications enabled?\nDid you grant ROOT rights to Corona Warn Companion? + ERROR!\n\nNo encounters could be extracted.\nAre Exposure Notifications enabled?\nDid you grant ROOT rights to this app? Error!\n\nDownload of Diagnosis Keys failed.\nIs your internet connection working? About this app - About Corona Warn Companion - Corona-\nWarn-\nCompanion + About this app Version\n%s (%d, %s) \ No newline at end of file