blob: b0dddbdeba74ca14ac6be22f4be5d4b29c2abc9e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
<?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" />
<!-- our own notifications, raised from UnifiedPush messages (Android 13+) -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<!-- Which apps can act as a UnifiedPush distributor: Android 11+ hides the
package list unless we say what we're looking for. -->
<queries>
<intent>
<action android:name="org.unifiedpush.android.distributor.REGISTER" />
</intent>
</queries>
<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/" />
<!-- System-bar colors: without these the TWA status bar defaults to
white. Light follows the page background, dark the PWA's
theme_color, so the bar icons keep their contrast either way. -->
<meta-data
android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR"
android:resource="@color/statusBarColor" />
<meta-data
android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR_DARK"
android:resource="@color/statusBarColorDark" />
<meta-data
android:name="android.support.customtabs.trusted.NAVIGATION_BAR_COLOR"
android:resource="@color/navigationBarColor" />
<meta-data
android:name="android.support.customtabs.trusted.NAVIGATION_BAR_COLOR_DARK"
android:resource="@color/navigationBarColorDark" />
<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>
</activity>
<!-- Scheme + NFC intents land on this per-intent trampoline, not the
launcher: a TWA already on screen ignores a new intent to its
launcher, so a second lightning: tap used to do nothing. The
trampoline relaunches the TWA with the new URL and finishes.
lnurlw/lnurlp ride along — bolt cards and LNURL NFC tags emit
those schemes; NDEF dispatch needs no NFC permission. -->
<activity
android:name="io.coinos.app.IntentActivity"
android:exported="true"
android:noHistory="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<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>
<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>
<!-- UnifiedPush: the distributor broadcasts here. Web push needs Google
Play Services on Android, so on a de-Googled phone this is the only
way the wallet can be reached at all while it isn't open. -->
<receiver
android:name="io.coinos.app.PushReceiver"
android:exported="true">
<intent-filter>
<action android:name="org.unifiedpush.android.connector.NEW_ENDPOINT" />
<action android:name="org.unifiedpush.android.connector.REGISTRATION_FAILED" />
<action android:name="org.unifiedpush.android.connector.UNREGISTERED" />
<action android:name="org.unifiedpush.android.connector.MESSAGE" />
</intent-filter>
</receiver>
</application>
</manifest>
|