Skip to content

Commit

Permalink
Added playstore publication_version flavor.
Browse files Browse the repository at this point in the history
This flavor avoids references to Corona in the app name etc.
  • Loading branch information
mh- committed Aug 10, 2020
1 parent 16e7105 commit 411e7a9
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 27 deletions.
16 changes: 15 additions & 1 deletion corona-warn-companion/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ android {
buildToolsVersion "29.0.3"

defaultConfig {
applicationId 'org.tosl.coronawarncompanion'
minSdkVersion 23
targetSdkVersion 29
versionName androidGitVersion.name()
Expand Down Expand Up @@ -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 {
Expand Down
18 changes: 9 additions & 9 deletions corona-warn-companion/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".CWCApplication"
android:name="org.tosl.coronawarncompanion.CWCApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="AllowBackup">

<activity
android:name=".MainActivity"
android:name="org.tosl.coronawarncompanion.MainActivity"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -26,20 +26,20 @@
</intent-filter>
</activity>

<activity android:name=".DisplayDetailsActivity">
<activity android:name="org.tosl.coronawarncompanion.DisplayDetailsActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
android:value="org.tosl.coronawarncompanion.MainActivity" />
</activity>
<activity android:name=".DisplayLicensesActivity">
<activity android:name="org.tosl.coronawarncompanion.DisplayLicensesActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
android:value="org.tosl.coronawarncompanion.MainActivity" />
</activity>
<activity android:name=".AboutActivity">
<activity android:name="org.tosl.coronawarncompanion.AboutActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
android:value="org.tosl.coronawarncompanion.MainActivity" />
</activity>
</application>
</manifest>
4 changes: 2 additions & 2 deletions corona-warn-companion/src/main/assets/notice.md
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> and other contributors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down
12 changes: 5 additions & 7 deletions corona-warn-companion/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Corona-Warn-Companion</string>
<plurals name="matches_on_day">
<item quantity="one">Risiko-Begegnung am %s:</item>
<item quantity="other">Risiko-Begegnungen am %s:</item>
Expand Down Expand Up @@ -34,17 +33,16 @@
<string name="menu_entry_toggle_demo_mode">Demo Modus an/aus</string>
<string name="menu_entry_oss_licenses">Open Source Software Lizenzen</string>
<string name="title_activity_licenses">OSS Lizenzen</string>
<string name="title_activity_main">Corona Warn Companion</string>
<string name="title_activity_main_demo">Corona Warn Companion DEMO</string>
<string name="title_activity_details">Corona Warn Companion</string>
<string name="title_activity_main">@string/app_name</string>
<string name="title_activity_main_demo_suffix">" DEMO"</string>
<string name="title_activity_details">@string/app_name</string>
<string name="title_activity_details_demo">DEMO Beispiel-Details</string>
<string name="menu_entry_view_further_oss_licenses">Weitere Open Source Software Lizenzen</string>
<string name="title_activity_further_licenses">Weitere OSS Lizenzen</string>
<string name="demo_mode_switching_not_possible">Im Moment kann der Modus leider nicht gewechselt werden.\nBitte warte, bis alle Berechnungen abgeschlossen sind.</string>
<string name="error_no_rpis">FEHLER!\n\Begegnungen konnten nicht ausgelesen werden.\nSind Exposure Notifications eingeschaltet?\nHast Du der Corona Warn Companion App ROOT-Rechte gegeben?</string>
<string name="error_no_rpis">FEHLER!\n\Begegnungen konnten nicht ausgelesen werden.\nSind Exposure Notifications eingeschaltet?\nHast Du dieser App ROOT-Rechte gegeben?</string>
<string name="error_download">Fehler!\n\nEs gab ein Problem beim Herunterladen der Diagnoseschlüssel.\nFunktioniert Deine Internetverbindung?</string>
<string name="menu_entry_about">Über diese App</string>
<string name="title_activity_about">Über Corona Warn Companion</string>
<string name="about_name">Corona-\nWarn-\nCompanion</string>
<string name="title_activity_about">Über diese App</string>
<string name="about_version">Version\n%s (%d, %s)</string>
</resources>
12 changes: 5 additions & 7 deletions corona-warn-companion/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<item quantity="one">%d risk encounter. Tap to see details…</item>
<item quantity="other">%d risk encounters. Tap to see details…</item>
</plurals>
<string name="app_name">Corona-Warn-Companion</string>
<string name="no_matches_found">No risk encounters found.</string>
<string name="rpis_extracted" tools:ignore="PluralsCandidate">%d encounters scanned (%s-%s).</string>
<string name="diagnosis_keys_downloaded" tools:ignore="PluralsCandidate">%d diagnosis keys downloaded."</string>
Expand All @@ -34,17 +33,16 @@
<string name="menu_entry_toggle_demo_mode">Toggle Demo Mode</string>
<string name="menu_entry_oss_licenses">Open Source Software Licenses</string>
<string name="title_activity_licenses">OSS Licenses</string>
<string name="title_activity_main">Corona Warn Companion</string>
<string name="title_activity_main_demo">Corona Warn Companion DEMO</string>
<string name="title_activity_details">Corona Warn Companion</string>
<string name="title_activity_main">@string/app_name</string>
<string name="title_activity_main_demo_suffix"> DEMO</string>
<string name="title_activity_details">@string/app_name</string>
<string name="title_activity_details_demo">DEMO sample details</string>
<string name="menu_entry_view_further_oss_licenses">Further Open Source Software Licenses</string>
<string name="title_activity_further_licenses">Further OSS Licenses</string>
<string name="demo_mode_switching_not_possible">Sorry, at the moment we cannot switch modes.\nPlease wait until all operations have finished.</string>
<string name="error_no_rpis">ERROR!\n\nNo encounters could be extracted.\nAre Exposure Notifications enabled?\nDid you grant ROOT rights to Corona Warn Companion?</string>
<string name="error_no_rpis">ERROR!\n\nNo encounters could be extracted.\nAre Exposure Notifications enabled?\nDid you grant ROOT rights to this app?</string>
<string name="error_download">Error!\n\nDownload of Diagnosis Keys failed.\nIs your internet connection working?</string>
<string name="menu_entry_about">About this app</string>
<string name="title_activity_about">About Corona Warn Companion</string>
<string name="about_name">Corona-\nWarn-\nCompanion</string>
<string name="title_activity_about">About this app</string>
<string name="about_version">Version\n%s (%d, %s)</string>
</resources>

0 comments on commit 411e7a9

Please sign in to comment.