aboutsummaryrefslogtreecommitdiffstats
path: root/android/app/src/main/AndroidManifest.xml
blob: 2f0f950d5bfec6d479a5daac60f7b1d494d18d60 (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
<?xml version="1.0" encoding="utf-8"?>
<!-- What every build shares: notifications and the UnifiedPush receiver.
     Each flavor's own manifest adds its activities — the TWA's live in
     src/twa, the WebView's (webview and fdroid) in src/webview — so no build
     declares an activity whose class it doesn't compile. -->
<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>
    <!-- whether Google Play Services is here (Push.playServices): with it, the
         TWA's web push works and UnifiedPush isn't asked -->
    <package android:name="com.google.android.gms" />
  </queries>
  <application
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:supportsRtl="true">
    <!-- 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>