- Drop tracked Android build intermediates (already gitignored; regenerated by Gradle). - Remove unused sticker-design.png; recompress logo, cover and guide images. - Replace the stale README with a concise current project guide. |
||
|---|---|---|
| .. | ||
| android | ||
| src | ||
| package.json | ||
| README.md | ||
skatespots-nfc (local Capacitor Android plugin)
Writes the card/pass verify URL to an NFC tag from inside the SkateSpots APK.
Why a plugin? Web NFC (NDEFReader) is not exposed inside Capacitor's
WebView, so the browser path in src/lib/nfc.ts can't run in the APK. On the web
(Chrome/Android) the app uses Web NFC; in the APK it uses this plugin.
What it writes: only a single NDEF URL record — the same pointer the QR
carries. A tag is passive and can be cloned like a QR; trust comes from the relay
signature, verified at /#/verify/<naddr>.
Wiring
package.jsonhas"skatespots-nfc": "file:packages/skatespots-nfc"sonpx cap sync androidadds the module.- The app registers the plugin by name (
registerPlugin('SkateSpotsNfc')); it does not import this package into the web bundle. - Permissions (
NFC, optionaluses-feature) merge from the plugin manifest.
API
isSupported(): { supported } · writeUrl({ url }) · cancel()
⚠️ Unverified
Needs npm run android:sync + a real device. Android-only (iOS sandboxes NFC
writing). The Kotlin uses NfcAdapter.enableReaderMode; tune per the app's
Capacitor version if Gradle complains.