-
Notifications
You must be signed in to change notification settings - Fork 120
Expand file tree
/
Copy pathAndroidManifest.xml
More file actions
210 lines (178 loc) · 8.95 KB
/
AndroidManifest.xml
File metadata and controls
210 lines (178 loc) · 8.95 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- 拥有完全的网络访问权限 -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- 运行前台服务 -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--
Fix the problem that notifications cannot be allowed on Android 13
https://github.com/siyuan-note/siyuan/issues/7960
https://developer.android.google.cn/guide/topics/ui/notifiers/notification-permission?hl=zh-cn
-->
<uses-permission
android:name="android.permission.POST_NOTIFICATIONS"
android:minSdkVersion="33" />
<!-- Foreground KeepLiveService Crash on Android 14 https://github.com/siyuan-note/siyuan/issues/9212 -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<!-- 支持拍照 Support taking photos for inserting on Android https://github.com/siyuan-note/siyuan/issues/10479 -->
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<!-- 拍摄照片和视频 -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- 添加桌面快捷方式 -->
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<!-- 预约通知 -->
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<application
android:name=".App"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:localeConfig="@xml/locales_config"
android:supportsRtl="true"
android:theme="@style/Theme.SiYuan"
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config"
android:enableOnBackInvokedCallback="true"
tools:targetApi="tiramisu">
<activity
android:name=".activity.BootActivity"
android:autoRemoveFromRecents="true"
android:configChanges="orientation|screenSize"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/Theme.SiYuan.Boot">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<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="siyuan"
android:host="blocks" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<!-- TODO Supports local shorthands by shortcut on mobile https://github.com/siyuan-note/siyuan/issues/14414
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
-->
</activity>
<activity
android:name=".activity.RedirectUriReceiverActivity"
android:excludeFromRecents="true"
android:exported="true"
android:noHistory="true"
android:theme="@style/Theme.SiYuan.Transparent">
<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="siyuan"
android:host="oidc-callback" />
</intent-filter>
</activity>
<activity
android:name=".activity.MainActivity"
android:autoRemoveFromRecents="true"
android:configChanges="keyboard|keyboardHidden|screenLayout|uiMode|orientation|screenSize|smallestScreenSize"
android:hardwareAccelerated="true"
android:theme="@style/Theme.SiYuan"
android:windowSoftInputMode="adjustResize">
<!--
android:windowSoftInputMode="adjustResize"
是为了解决软键盘遮挡 https://github.com/siyuan-note/siyuan-android/pull/7
不要添加 android:launchMode="singleInstance" 否则无法从相册中选择上传
Supports inserting pictures from photo gallery on the Android
https://github.com/siyuan-note/siyuan/issues/9455
-->
</activity>
<!-- TODO Supports local shorthands by shortcut on mobile https://github.com/siyuan-note/siyuan/issues/14414
<activity
android:name=".ShortcutActivity"
android:exported="true"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar"
android:windowSoftInputMode="adjustPan">
<intent-filter android:label="@string/shortcut_shorthand">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter android:label="@string/shortcut_shorthand">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter android:label="@string/shortcut_shorthand">
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter android:label="@string/shortcut_shorthand">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
</intent-filter>
<intent-filter android:label="@string/shortcut_shorthand">
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
</intent-filter>
<intent-filter android:label="@string/shortcut_shorthand">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/*" />
</intent-filter>
<intent-filter android:label="@string/shortcut_shorthand">
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/*" />
</intent-filter>
<intent-filter android:label="@string/shortcut_shorthand">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/*" />
</intent-filter>
<intent-filter android:label="@string/shortcut_shorthand">
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/*" />
</intent-filter>
</activity>
-->
<service
android:name=".service.KeepLiveService"
android:foregroundServiceType="specialUse">
<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="hosting" />
</service>
<!-- 监听系统广播以实现预约通知 -->
<receiver android:name=".service.NotificationReceiver" />
<!--
Support opening assets through other apps on the Android
https://github.com/siyuan-note/siyuan/issues/10657
-->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="@string/app_package_name"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<!-- 多渠道打包配置 -->
<meta-data
android:name="CHANNEL"
android:value="${CHANNEL}" />
</application>
</manifest>