Android Automotive (Android 12+) app for Parcel: hourly delivery checks with notifications on tracking updates
翻訳待ち
Loading the full README.
Read the full README ↗Parcel deliveries for Android Automotive OS 12+ (API 31), built with the Car App Library templates (POI category). Parked use only: the app isn't declared distraction-optimized, so the system blocks it as soon as the car moves; the notifications still arrive while driving.
demo: made-up deliveries with no Parcel account, for a try-out, the emulator run and the Play reviewOn the Android Automotive emulator (generic image, templates host), with the demo key. These are the Google Play listing screenshots, refreshed by running the Emulator workflow by hand with screenshots.
| Deliveries | Delivery | Settings |
|---|---|---|
Same API and logic as ha-parcel:
| What | Source |
|---|---|
| Deliveries, statuses, events, expected dates | Parcel external API, GET https://api.parcel.app/external/deliveries/?filter_mode=recent with the api-key header, 20 requests an hour |
| API key | Generated at web.parcelapp.net (Parcel Premium); stays on the car, left out of Android backups, only sent to api.parcel.app |
| Carrier names | Parcel's public supported_carriers.json (no key), daily cache |
| Changes | Each delivery's status and latest event, compared with the previous check (kept on the device) |
The hourly check (WorkManager, with a network, while the car is on) notifies the deliveries that changed; opening the app shows the last check at once and fetches again after 5 minutes. A new key's own check is the first one, so the deliveries already there are not notified. The "recent" list is always fetched, so a delivery that turns delivered still gets its notification; "under way only" just filters the screen.
app/src/main/java/me/jstephan/parcel/
├── ParcelApp.kt # notification channel, hourly check schedule
├── ParcelService.kt # CarAppService + Session (opens a delivery from its notification)
├── Prefs.kt # API key (not backed up), filter, notifications
├── data/ # HTTP, Parcel API client, models, repository (cache + change detection), demo data
├── work/ # CheckWorker (hourly), Notifier
└── ui/ # list, detail, settings (ListTemplate), API key (SignInTemplate), setup (MessageTemplate)
./gradlew assembleDebug
Test on an emulator from Android Studio's Device Manager with an Automotive system image
(Android 12L / API 32 or later, "with Google APIs/Play"). Debug builds accept any templates host;
release builds only the hosts in the library's allowlist. Type demo as the API key to try it without a Parcel
account. To run the hourly check without waiting, force its job (WorkManager runs on JobScheduler):
adb shell dumpsys jobscheduler | grep -A2 me.jstephan.parcel # JOB #u0a123/<id>
adb shell cmd jobscheduler run -f me.jstephan.parcel <id>
On a real car, third-party templated apps are installed through Google Play (internal or closed testing track).
| Workflow | What |
|---|---|
| Lint | pre-commit (whitespace, YAML/XML/TOML, Ruff for scripts/), Detekt + ktlint (Kotlin quality, dead code), Android lint, jscpd (duplication). Detekt and Android lint findings go to code scanning, shown on pull requests |
| CodeQL | Security and quality queries on the Kotlin code and the workflows; weekly too |
| Build | Debug APK and JVM unit tests (testDebugUnitTest); Kotlin compiler errors and Gradle failures as annotations, test report as an artifact on failure |
| Emulator | Runs the release build on an Android Automotive emulator with the templates host (landscape and portrait) on each app change, with the demo key; fails on a crash, a template the host refuses, or if the app isn't blocked once the car moves. Run by hand with screenshots to refresh the Play screenshots |
| Release | On main, when appVersion in app/build.gradle.kts has no tag yet: signed APK + App Bundle, notes from CHANGELOG.md; upload to Google Play when its secret is set |
| Update release notes | Rewrites a release's notes from CHANGELOG.md (input tag) |
| Clean up merged branches | Deletes merged branches after each pull request and weekly |
| Stale | Marks and closes inactive issues and pull requests |
Release signing uses the repository secrets SIGNING_KEYSTORE_BASE64, SIGNING_STORE_PASSWORD,
SIGNING_KEY_ALIAS and SIGNING_KEY_PASSWORD; without them the release is signed with the debug key
(emulator / adb only, not accepted by Google Play).
This is the beginning of the README. Read the rest at the original. Read the full README ↗