Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
translate ▾

Modern-Apps.git / notes / src / main / AndroidManifest.xml

AndroidManifest.xml139 lines · 6.5 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools">
4
5 <!-- No network, deliberately: local notes only. :library:image merges in
6 INTERNET (its HttpFetcher) and ACCESS_NETWORK_STATE, neither
7 of which this app uses, so both are stripped here like music/ does. -->
8 <!-- MAOS: opt out of the GrapheneOS Sensors permission (OTHER_SENSORS). -->
9 <!-- This app uses no motion/environment sensors; MAOS withholds the -->
10 <!-- Sensors permission at install instead of auto-granting it. -->
11 <uses-permission android:name="com.vayunmathur.permission.SENSORS_OPTOUT" />
12 <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
13
14 <!-- Single APK for phone and watch. Deliberately NO
15 android.hardware.type.watch uses-feature here: required="true"
16 would block every phone install, and required="false" is
17 disallowed for this feature (lint InvalidWearFeatureAttribute;
18 Google's packaging model does not support one APK for Wear and
19 non-Wear via Play). This app does not distribute through Play's
20 watch channel — it is sideloaded / F-Droid-installed, where no
21 feature declaration is needed to install on a watch — so the
22 APK carries no watch feature filter at all and
23 FormFactor.isWatch (PackageManager.FEATURE_WATCH, still
24 reported by watch hardware at runtime) routes the experience. -->
25 <uses-feature
26 android:name="android.hardware.touchscreen"
27 android:required="false" />
28
29 <uses-permission android:name="android.permission.INTERNET" tools:node="remove" />
30 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" tools:node="remove" />
31
32 <permission
33 android:name="com.vayunmathur.notes.permissions.ACCESS_NOTES"
34 android:protectionLevel="signature" />
35
36 <!-- Relay IPC for the everysync app's NoteSink. Signature-level: only apps signed
37 with the Modern Apps key can hold it, and the provider additionally narrows the
38 caller to com.vayunmathur.everysync at runtime. -->
39 <permission
40 android:name="com.vayunmathur.notes.permission.RELAY"
41 android:protectionLevel="signature" />
42
43 <application
44 android:allowBackup="true"
45 android:backupAgent=".platform.AppBackupAgent"
46 android:dataExtractionRules="@xml/data_extraction_rules"
47 android:icon="@mipmap/ic_launcher"
48 android:label="@string/app_name"
49 android:roundIcon="@mipmap/ic_launcher"
50 android:supportsRtl="true"
51 android:theme="@style/Theme.General">
52
53 <!-- Watch experience is paired with the phone app, not standalone. -->
54 <meta-data
55 android:name="com.google.android.wearable.standalone"
56 android:value="false" />
57 <activity
58 android:configChanges="mcc|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
59 android:name=".MainActivity"
60 android:exported="true"
61 android:theme="@style/Theme.General">
62 <intent-filter>
63 <action android:name="android.intent.action.MAIN" />
64 <category android:name="android.intent.category.LAUNCHER" />
65 </intent-filter>
66
67 <intent-filter>
68 <action android:name="android.intent.action.VIEW" />
69 <action android:name="android.intent.action.EDIT" />
70 <category android:name="android.intent.category.DEFAULT" />
71 <category android:name="android.intent.category.BROWSABLE" />
72 <data android:mimeType="text/markdown" />
73 <data android:mimeType="text/x-markdown" />
74 </intent-filter>
75
76 <intent-filter>
77 <action android:name="android.intent.action.SEND" />
78 <category android:name="android.intent.category.DEFAULT" />
79 <data android:mimeType="text/markdown" />
80 <data android:mimeType="text/x-markdown" />
81 </intent-filter>
82
83 <intent-filter>
84 <action android:name="android.intent.action.VIEW" />
85 <category android:name="android.intent.category.DEFAULT" />
86 <category android:name="android.intent.category.BROWSABLE" />
87 <data android:scheme="content" />
88 <data android:scheme="file" />
89 <data android:host="*" />
90 <data android:mimeType="application/octet-stream" />
91 <data android:pathSuffix=".md" />
92 <data android:pathSuffix=".markdown" />
93 <data android:pathPattern=".*\\.md" />
94 <data android:pathPattern=".*\\.markdown" />
95 </intent-filter>
96 </activity>
97
98 <!-- Watch experience: entered only via MainActivity's watch routing
99 (no launcher filter of its own). It is inert on a phone: only
100 the watch-routed MainActivity can start it. -->
101 <activity
102 android:name=".ui.WearMainActivity"
103 android:exported="false"
104 android:taskAffinity=""
105 android:theme="@android:style/Theme.Material.NoActionBar" />
106
107 <activity
108 android:name=".intents.GetIntent"
109 android:exported="true"
110 android:theme="@android:style/Theme.NoDisplay"
111 android:permission="com.vayunmathur.notes.permissions.ACCESS_NOTES">
112 </activity>
113
114 <activity
115 android:name=".intents.InsertIntent"
116 android:exported="true"
117 android:theme="@android:style/Theme.NoDisplay"
118 android:permission="com.vayunmathur.notes.permissions.ACCESS_NOTES">
119 </activity>
120
121 <provider
122 android:name="androidx.core.content.FileProvider"
123 android:authorities="com.vayunmathur.notes.fileprovider"
124 android:exported="false"
125 android:grantUriPermissions="true">
126 <meta-data
127 android:name="android.support.FILE_PROVIDER_PATHS"
128 android:resource="@xml/file_paths" />
129 </provider>
130
131 <provider
132 android:name=".sync.RelayNoteProvider"
133 android:authorities="com.vayunmathur.notes.relay"
134 android:exported="true"
135 android:readPermission="com.vayunmathur.notes.permission.RELAY"
136 android:writePermission="com.vayunmathur.notes.permission.RELAY" />
137 </application>
138
139</manifest>