Skip to content

Commit

Permalink
fix: Removed donation methods just for FULL release as Google forbids…
Browse files Browse the repository at this point in the history
… other payments besides Google Play. This is requirement to meet Google Play policy.
  • Loading branch information
baruckis committed Mar 1, 2019
1 parent cca891a commit 9061afa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ android {
applicationId "com.baruckis.mycryptocoins"
minSdkVersion versions.min_sdk
targetSdkVersion versions.target_sdk
versionCode 1
versionCode 2
versionName "@string/app_version"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -57,9 +57,11 @@ android {
applicationIdSuffix ".demo"
// This new string resource item will be generated at build time.
resValue "string", "app_id_suffix", ".demo"
buildConfigField 'boolean', 'IS_DEMO', 'true'
}
full {
resValue "string", "app_id_suffix", ""
buildConfigField 'boolean', 'IS_DEMO', 'false'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import androidx.navigation.Navigation
import androidx.preference.ListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import com.baruckis.mycryptocoins.BuildConfig
import com.baruckis.mycryptocoins.R
import com.baruckis.mycryptocoins.dependencyinjection.Injectable
import com.baruckis.mycryptocoins.ui.mainlist.MainActivity
Expand Down Expand Up @@ -186,6 +187,10 @@ class SettingsFragment : PreferenceFragmentCompat(), Injectable, RewardedVideoAd

val preferenceDonateCrypto = findPreference(getString(R.string.pref_donate_crypto_key)) as Preference

// Removed donation methods just for FULL release as Google forbids other payments
// besides Google Play. This is requirement to meet Google Play policy.
preferenceDonateCrypto.isVisible = BuildConfig.IS_DEMO

preferenceDonateCrypto.setOnPreferenceClickListener {

// Create an instance of the dialog fragment and show it.
Expand All @@ -205,6 +210,8 @@ class SettingsFragment : PreferenceFragmentCompat(), Injectable, RewardedVideoAd

val preferenceBuyMeCoffee = findPreference(getString(R.string.pref_buy_me_coffee_key)) as Preference

preferenceBuyMeCoffee.isVisible = BuildConfig.IS_DEMO

preferenceBuyMeCoffee.setOnPreferenceClickListener {

browseUrl(getString(R.string.pref_buy_me_coffee_url))
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/pref_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@
android:title="@string/pref_license_title" />

<Preference
android:selectable="false"
android:icon="@drawable/ic_info_outline"
android:selectable="false"
android:summary="@string/pref_app_summary"
android:title="@string/pref_app_title" />

Expand Down

0 comments on commit 9061afa

Please sign in to comment.