Skip to content

Quick start: NFC tags, Android widget, quick actions and start/stop links - #1

Merged
danielehrhardt merged 7 commits into
mainfrom
feature/quick-start
Nov 8, 2026
Merged

danielehrhardt merged 7 commits into
mainfrom
feature/quick-start

Conversation

@danielehrhardt

Copy link
Copy Markdown
Contributor

Start and end trips without opening the app first.

What's new

  • Links: openfahrtenbuch://start, openfahrtenbuch://stop, openfahrtenbuch://toggle and the same paths on https://fahrtenbuch.codext.de (universal links / app links). Handled in src/app/+native-intent.tsx and src/lib/actions.ts; ignored until onboarding is done. toggle only ends a trip that has run for more than a minute, so a double tap does not end it right away.
  • NFC tag: More > NFC tag writes https://fahrtenbuch.codext.de/toggle plus an Android application record to a sticker (react-native-nfc-manager). Android opens the app directly through an NDEF_DISCOVERED filter (plugins/with-nfc-start.js), iPhone shows the background tag reading notification via the universal link.
  • Android widget: one tap starts or ends a trip and shows when the running trip started (react-native-android-widget, src/widget). It updates whenever the recording state changes. More > Add widget pins it.
  • Quick actions: long press on the app icon shows Start trip or End trip (expo-quick-actions), kept in sync with the recording state.
  • Website: apple-app-site-association, assetlinks.json, fallback pages for /start, /stop, /toggle and a FAQ entry (already deployed).

Fixes found on the way

  • Android Back left the app from every pushed screen. Predictive back was opted in, and the back press never reached React Native. predictiveBackGestureEnabled is now off.
  • Ending a trip from outside the app left a stale recording screen under the finish form. The link handler now closes it before the finish form opens.

Android Auto is not included: it only allows navigation, media, messaging, point of interest, IoT and weather apps.

Testing

  • bun run check passes (42 checks).
  • Android emulator (release build): start link, NFC intent with https://fahrtenbuch.codext.de/stop, widget pin, widget start from a cold start, widget state switch, quick action End trip, Back from the finish form.
  • iOS simulator (release build): links ignored before onboarding, start and stop links, finish form, NFC screen.
  • Not tested on hardware: writing a real tag and iPhone background tag reading.

@danielehrhardt
danielehrhardt merged commit 54a1814 into main Nov 8, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant