aboutsummaryrefslogtreecommitdiffstats
path: root/android/app/src/main/AndroidManifest.xml
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-04 20:48:27 -0700
committerAdam Soltys <[email protected]>2026-09-04 20:48:27 -0700
commit8d27a5d2c59e0f1824753d59a7326b6b76887bf7 (patch)
tree5894488403d2f72b994255ba8ff6859121ead1d4 /android/app/src/main/AndroidManifest.xml
parent175600238fb3e9cf60bd65b0164ced476d18f445 (diff)
downloadcoinosv3-8d27a5d2c59e0f1824753d59a7326b6b76887bf7.tar.gz
coinosv3-8d27a5d2c59e0f1824753d59a7326b6b76887bf7.zip
Android wrapper app (android/): a minimal TWA around v3.coinos.io whose whole reason to exist is intent registration — lightning:/bitcoin:/nostr:/lnurl:/lnurlw:/lnurlp: VIEW intents and the same schemes via NFC NDEF dispatch (bolt cards, address stickers; NFC declared required=false), plus verified https links to the site. LauncherActivity forwards a scheme URI into the web app as ?u=<encoded>; the web app reads it BEFORE features construct — a nostr npub/nprofile rewrites itself onto the existing /npub profile deep link, payment URIs stash and dispatch through handleScanned (the QR path) once a wallet is open, and the param is stripped from the URL either way. assetlinks.json (static/.well-known/, copied by build.js) vouches for the signing cert so the TWA runs URL-bar-less; the built APK is served at /coinos.apk for sideloading. Signing keystore lives in android/ GITIGNORED (keystore.properties beside it) — the assetlinks fingerprint pins it, so losing it means re-shipping assetlinks too. Verified: headless ?u= routing (lightning → Send with invoice filled + URL cleaned; nostr → profile page), APK installed on a real phone via adb, schemes registered (chooser appears where other wallets also claim lightning:)
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MGzU12QrAA4G6BYGzGVdXz
Diffstat (limited to 'android/app/src/main/AndroidManifest.xml')
-rw-r--r--android/app/src/main/AndroidManifest.xml69
1 files changed, 69 insertions, 0 deletions
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..c6b7a01
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- TWA wrapper: full-screen Chrome running https://v3.coinos.io (needs the
+ site's /.well-known/assetlinks.json to name this app's signing cert, or
+ Android shows a URL bar). The point of the wrapper is the intent
+ filters: lightning:/bitcoin:/nostr:/lnurl: URIs open this app, and
+ LauncherActivity forwards them into the web app as ?u=<encoded>. -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- NFC is a way in (bolt cards, NDEF tags), never a requirement -->
+ <uses-feature android:name="android.hardware.nfc" android:required="false" />
+ <application
+ android:label="@string/app_name"
+ android:icon="@mipmap/ic_launcher"
+ android:supportsRtl="true">
+ <meta-data
+ android:name="asset_statements"
+ android:resource="@string/asset_statements" />
+ <activity
+ android:name="io.coinos.app.LauncherActivity"
+ android:exported="true"
+ android:theme="@android:style/Theme.Translucent.NoTitleBar">
+ <meta-data
+ android:name="android.support.customtabs.trusted.DEFAULT_URL"
+ android:value="https://v3.coinos.io/" />
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ <!-- own the site's links (verified against assetlinks.json) -->
+ <intent-filter android:autoVerify="true">
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.BROWSABLE" />
+ <data android:scheme="https" android:host="v3.coinos.io" />
+ </intent-filter>
+ <!-- the payment + nostr schemes: the reason this wrapper exists.
+ lnurlw/lnurlp ride along — bolt cards and LNURL NFC tags emit
+ those schemes. -->
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.BROWSABLE" />
+ <data android:scheme="lightning" />
+ <data android:scheme="bitcoin" />
+ <data android:scheme="nostr" />
+ <data android:scheme="lnurl" />
+ <data android:scheme="lnurlw" />
+ <data android:scheme="lnurlp" />
+ </intent-filter>
+ <!-- NFC: an NDEF tag carrying one of our URIs (a bolt card tap, an
+ address sticker) dispatches here directly — same forwarding path
+ as a VIEW intent, no NFC permission needed for NDEF dispatch. -->
+ <intent-filter>
+ <action android:name="android.nfc.action.NDEF_DISCOVERED" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="lightning" />
+ <data android:scheme="bitcoin" />
+ <data android:scheme="nostr" />
+ <data android:scheme="lnurl" />
+ <data android:scheme="lnurlw" />
+ <data android:scheme="lnurlp" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.nfc.action.NDEF_DISCOVERED" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="https" android:host="v3.coinos.io" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>