Tiny open-source Android app and four instrumented tests: the sample pair for a first Grid run.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Stephen Way 6a87900879
All checks were successful
release-apks / build (push) Successful in 5m50s
Keep the display still before the first tap (Nokia 6.1) (#3)
2026-11-18 18:40:13 +00:00
.forgejo/workflows Add the sample app, four instrumented tests and the APK release workflow (#1) 2026-11-17 20:39:16 +00:00
app Keep the display still before the first tap (Nokia 6.1) (#3) 2026-11-18 18:40:13 +00:00
.gitignore Add the sample app, four instrumented tests and the APK release workflow (#1) 2026-11-17 20:39:16 +00:00
build.gradle.kts Add the sample app, four instrumented tests and the APK release workflow (#1) 2026-11-17 20:39:16 +00:00
gradle.properties Add the sample app, four instrumented tests and the APK release workflow (#1) 2026-11-17 20:39:16 +00:00
LICENSE Add the sample app, four instrumented tests and the APK release workflow (#1) 2026-11-17 20:39:16 +00:00
README.md Keep the display still before the first tap (Nokia 6.1) (#3) 2026-11-18 18:40:13 +00:00
settings.gradle.kts Add the sample app, four instrumented tests and the APK release workflow (#1) 2026-11-17 20:39:16 +00:00

grid-sample-android

A tiny Android app and four instrumented tests. It exists so a first Grid run has something to run: one app APK and one matching test APK that pass on any phone with Android 8 or later.

  • App: org.gridsample.app. One screen with a title, a counter and a button. No network, no permissions, no libraries.
  • Tests: org.gridsample.app.test (runner androidx.test.runner.AndroidJUnitRunner), class org.gridsample.app.MainActivityTest: launches, shows the title, tapping counts up, the count survives recreation. All four are expected to pass.
  • minSdk 26, targetSdk 36.

Get the APKs

Each tag (v*) builds two files and a SHA256SUMS file. They are published with each Grid release under https://dl.fjord.sh/grid/sample/<version>/; the same files are the grid-sample-apks artifact of the tag's workflow run.

  • grid-sample-debug.apk (the app)
  • grid-sample-debug-androidTest.apk (its tests; the name contains androidTest, as the Grid console expects)

Check them with sha256sum -c SHA256SUMS. Both files are signed with the same debug key from one build, so a test run accepts the pair; do not mix files from different builds. A different build is signed with a different debug key, so uninstall the old copy before installing a newer one by hand (a Grid run removes the app and its tests when it ends). These files are not signed by the Grid publisher key.

In the Grid console, put both files on your node (Settings, Nodes, Upload a build), then run them from your enrolled phone's Runs tab. A pass is Passed with 4 tests passed.

Build it yourself

You need JDK 17, the Android SDK (platform 36, build-tools 36.0.0) and Gradle 9.4.1 (no wrapper is committed):

gradle :app:assembleDebug :app:assembleDebugAndroidTest

The files appear under app/build/outputs/apk/. To run the tests on a connected phone: gradle :app:connectedDebugAndroidTest.

.forgejo/workflows/release-apks.yml builds on version tags (v*) with pinned actions, a pinned and checksum-verified Gradle and Android command-line tools, and no secrets.

Licence

MIT, see LICENSE.

Screen orientation

The app is locked to portrait. Some phones on a dock or stand report a landscape orientation, and the display rotated while the first test tap was being sent, which dropped the tap. Android 16 and later ignore the lock on large screens, so each test that taps also waits (at most 5 s) for the display rotation to hold still first.