commit 4ca570c824b8e012203b8bae0eb0fee2479d829c truex <truex@equwal.com> 2026-09-21 02:50:42 -0700 Add a tip link to the build for direct install The Licence screen of the full flavour has a row that opens ko-fi.com/truex. A tip unlocks nothing. The URL is in a source file of the flavour, so that the Google Play build holds no link to another way to pay. Version 0.0.10-alpha, version code 10.
CHANGELOG.md | 7 ++++++- app/src/full/java/dev/equwal/assistkey/license/Tip.kt | 6 ++++++ .../java/dev/equwal/assistkey/ui/LicenseActivity.kt | 19 +++++++++++++++++++ app/src/play/java/dev/equwal/assistkey/license/Tip.kt | 9 +++++++++ gradle.properties | 4 ++-- 5 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fb765c..4cbf437 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,16 @@ # Changelog -## Unreleased +## 0.0.10-alpha - 2026-09-21 + +Version code 10. - **No Google Play, no lock.** On a device where the Google Play app is not installed or is turned off, the app is free and complete. There is no way to buy there, so there is nothing to lock. The licence screen says "Free on this device". A bought licence still comes first. Tests: `LicenseDecideTest`. +- The build for direct install has a tip link on the Licence screen + (ko-fi.com/truex). A tip unlocks nothing. The Google Play build has no such + link, because Google Play does not allow it. - The reasons in the allow step are hints of three to seven words. The app says "double tap" for Power too. diff --git a/app/src/full/java/dev/equwal/assistkey/license/Tip.kt b/app/src/full/java/dev/equwal/assistkey/license/Tip.kt new file mode 100644 index 0000000..bf0f01e --- /dev/null +++ b/app/src/full/java/dev/equwal/assistkey/license/Tip.kt @@ -0,0 +1,6 @@ +package dev.equwal.assistkey.license + +/** Where a user of the build for direct install can give a tip. A tip unlocks nothing. */ +object Tip { + const val URL = "https://ko-fi.com/truex" +} diff --git a/app/src/main/java/dev/equwal/assistkey/ui/LicenseActivity.kt b/app/src/main/java/dev/equwal/assistkey/ui/LicenseActivity.kt index 8bdc87b..2db626f 100644 --- a/app/src/main/java/dev/equwal/assistkey/ui/LicenseActivity.kt +++ b/app/src/main/java/dev/equwal/assistkey/ui/LicenseActivity.kt @@ -1,12 +1,15 @@ package dev.equwal.assistkey.ui import android.app.Activity +import android.content.Intent +import android.net.Uri import android.widget.LinearLayout import android.widget.Toast import dev.equwal.assistkey.BuildConfig import dev.equwal.assistkey.license.License import dev.equwal.assistkey.license.PlayBilling import dev.equwal.assistkey.license.Sku +import dev.equwal.assistkey.license.Tip import dev.equwal.assistkey.ui.Ui.button import dev.equwal.assistkey.ui.Ui.header import dev.equwal.assistkey.ui.Ui.note @@ -43,9 +46,25 @@ class LicenseActivity : Activity() { if (state.tier != License.Tier.LICENSED) buy(col, state) restore(col) } + tip(col) col.note("Version " + BuildConfig.VERSION_NAME) } + /** + * A link to give a tip. It unlocks nothing. It is only in the build for + * direct install: Google Play does not allow a link to another way to pay + * in an app that it distributes. + */ + private fun tip(col: LinearLayout) { + if (Tip.URL.isEmpty()) return + col.header("Say thanks") + col.row("Buy me a coffee", Tip.URL.removePrefix("https://") + " ยท unlocks nothing") { + runCatching { + startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(Tip.URL))) + }.onFailure { Toast.makeText(this, "No browser on this device", Toast.LENGTH_LONG).show() } + } + } + // ---- status --------------------------------------------------------------- private fun status(col: LinearLayout, state: License.State) { diff --git a/app/src/play/java/dev/equwal/assistkey/license/Tip.kt b/app/src/play/java/dev/equwal/assistkey/license/Tip.kt new file mode 100644 index 0000000..05beaee --- /dev/null +++ b/app/src/play/java/dev/equwal/assistkey/license/Tip.kt @@ -0,0 +1,9 @@ +package dev.equwal.assistkey.license + +/** + * The Google Play build has no tip link. Google Play does not allow a link to + * another way to pay in an app that it distributes. + */ +object Tip { + const val URL = "" +} diff --git a/gradle.properties b/gradle.properties index ce9eb50..1af4b2a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,8 +6,8 @@ android.nonTransitiveRClass=true kotlin.code.style=official # Release identity. versionCode must rise with every upload to Play. -assistkey.versionName=0.0.9-alpha -assistkey.versionCode=9 +assistkey.versionName=0.0.10-alpha +assistkey.versionCode=10 # The free beta ends on this date (UTC) at the latest. It is the backstop for # installs that cannot reach Google Play; the real switch is the