Skip to content
BaltaJmnPublic

About

Test4Test, the Android app where developers test each other's apps for Google Play's 12 testers for 14 days rule.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Test4Test

Google Play asks a personal developer account for 12 testers over 14 continuous days before it lets the app go to production. Test4Test is where Android developers find each other to cover that: you list your app, other developers join your closed test, you join theirs.

Android only, written with Kotlin Multiplatform and Compose Multiplatform so the UI and data layer live in :shared. The web version was dropped in 1.6 and everything happens in the app. The only thing left on the web is the privacy policy at testers.baltajmn.dev/privacy, because Play and Google sign-in require a public URL for it.

Setup

  1. Copy local.properties.example to local.properties and fill it in. That file documents every key it takes: the Supabase project, the RevenueCat public Android key (optional, without it the subscribe button is not drawn) and the upload keystore (optional, without it the release build comes out unsigned).
  2. local.properties is gitignored and stays that way. So does keystore/upload.jks.

Everything that lives outside this repo (Google Cloud, Play Console, RevenueCat, Supabase and Cloudflare) is written down in docs/servicios-externos.md, together with the mistakes each of those dashboards already cost us. Read it before touching any of them.

The Supabase service_role key is not in this repo and must never be: it only lives in the Supabase Edge Function secrets. The anon key is safe to hold locally, it is protected by RLS and designed to ship inside clients.

Gradle generates SupabaseConfig from those values into shared/build/generated, so every target reads them without a platform-specific mechanism. The build fails with an explicit message if they are missing. CI has no local.properties, so it passes SUPABASE_URL, SUPABASE_ANON_KEY and REVENUECAT_ANDROID_KEY as environment variables instead: the env vars win when both are present.

The Supabase project is tneuaccyzausvszpplms since 26-10-2026. The first one was paused for inactivity on the free plan and then lost, together with every account and app in it; keep-alive.yml pings it daily so it does not happen again.

Database

The schema lives in supabase/migrations and is already applied to the hosted project. Everything applied to the database goes through that directory: the first project lost the streak, reports and reciprocity because they were applied by hand and never committed. Authorization is enforced entirely by RLS, because clients talk to PostgREST directly with the public anon key: see the migration comments for what each policy guards.

Roles:

Who Can
anon Nothing. Every read and write needs a session.
Signed-in user Read everything; list 1 app at a time, edit its name and links, delete it; join and leave tests as themselves; comment as themselves; report; delete their own account.
Subscriber (is_premium) The same, with no limit on apps. Only the RevenueCat webhook writes the flag.
Admin (is_admin) Also delete any app or comment, and read and clear reports. Set from the dashboard.

is_premium and is_admin sit behind a column-level grant on profiles, and apps only lets owners update name and links, so nobody can move their own streak or hand an app to someone else.

Proof of install: app_testers.verified_at is only written by confirm_installed(), with the server clock, and the Android client calls it on every resume for the apps it sees installed from Google Play. Owners see the result per tester through app_tester_status.

Daily round (1.8): Google rejects production requests when testers do not use the app, so the feed opens with today's round, where each app you test is launched from Test4Test and record_open() stores the day with the server date in app_opens. app_tester_status adds opened_today and open_days (last 14 days) for the owner. An optional evening reminder runs on WorkManager from local state, with no network or session.

The feed reads apps_with_followers, a view that adds the tester count, how many of them were seen with the app installed, the streak day and whether the owner reciprocates. It carries security_invoker=true so RLS still applies to whoever queries it: keep that option on any migration that replaces the view.

supabase/tests/rls_test.sql covers every rule above inside a transaction that is rolled back. Run it after any change to a policy, grant or view.

Project layout

  • /shared holds the UI and data layer.
    • commonMain is platform-agnostic.
    • androidMain has billing, the install check and the system back handler.
  • /androidApp is the Android entry point: manifest, the test4test://login deep link and signing.
  • /web holds the privacy policy pages, app-ads.txt, the one-page index and config.json, the remote switch of the ads ({"ads": false}).
  • /branding holds the Play Store listing copy.
  • /docs holds the runbook for the external services.

Translations

shared/src/commonMain/composeResources carries eighteen locale folders for the seventeen languages of the family: values (English, the default), values-es, values-pt-rBR, values-hi, values-id, values-in, values-ar, values-fr, values-ru, values-tr, values-zh (Simplified Chinese), values-de, values-it, values-nl, values-pl, values-ja, values-ko and values-vi. values-id and values-in are byte-identical on purpose: in is the old ISO code for Indonesian and Android still resolves it on older devices. Arabic is right to left and the app mirrors. A string added to one folder should be added to all of them: nothing checks it, and a missing one shows in English.

Running the apps

  • Android app: ./gradlew :androidApp:assembleDebug
  • Tests: ./gradlew :shared:testAndroidHostTest

Before pushing, run exactly what CI runs:

./gradlew :androidApp:assembleDebug :androidApp:lintDebug :shared:testAndroidHostTest

Sin probar

Not tested yet, because it needs a real device, account or service. Each point stays open until someone tries it and crosses it out here.

  • The banner and its consent form on a real install. Debug builds and Play's Test Lab use Google's test unit, and the owner's own devices never see ads (invalid traffic closes the shared AdMob account). The real unit, the UMP form in the EEA and the 7-day gate (ADS_AFTER_DAYS) have not been seen end to end.
  • config.json as the ads switch. web/config.json is read at every return to the foreground; flipping "ads" to false should remove the banner without a release. Not tried against the deployed file yet.
  • The subscription on a real Play account: buying, restoring, and the RevenueCat webhook that writes profiles.is_premium (the app waits up to ten seconds for that row after paying).
  • The daily reminder (WorkManager, around 18:00) on phones with aggressive battery managers, and after a reboot.
  • The install check (rememberInstalledFromPlay) with real closed-test installs: a sideloaded APK must not count.
  • The rating request: Play never shows it in debug builds, so it can only be seen on a version installed from the store.
  • The daily ask budget and the Pro nudge in My apps (one ask every 24 hours between the nudge, the rating and the ads consent form; the nudge comes the first time and once more after 7 days). The rules are unit-tested; the wiring on a device is not.
  • The seven newest interface languages (de, it, nl, pl, ja, ko, vi) were translated without a native speaker reviewing them.

Releasing

Four workflows live in .github/workflows:

  • android-ci.yml runs on every push and pull request to main.
  • deploy-web.yml deploys web/ to the Cloudflare Worker when it changes on main. Nothing is built.
  • keep-alive.yml pings Supabase once a day so the free plan never pauses it.
  • release.yml ships the Android bundle to Play. It delegates to BaltaJmn/ci/.github/workflows/android-play-release.yml, which is shared with another app, so anything that changes the signing or upload sequence has to be changed there.

To publish a build:

  1. Bump versionCode and versionName in androidApp/build.gradle.kts. Play rejects a bundle whose versionCode it has already seen, so every upload burns one.
  2. Push to main.
  3. gh workflow run release.yml --ref main -f track=alpha, or push a v* tag, which defaults to the same track.
  4. Write the release notes by hand in Play Console. The workflow does not pass a whatsnew-dir, so a release uploaded without this step reaches testers with no notes at all.

The service account the upload runs as, the permissions it needs and the rest of the Play Console setup are in docs/servicios-externos.md.

Only the closed testing track counts toward the 12 testers and 14 continuous days that Play requires. Internal testing does not, whatever the tester count says there.

About

Test4Test, the Android app where developers test each other's apps for Google Play's 12 testers for 14 days rule.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages