]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/AndroidManifest.xml
Add WebView DevTools to the navigation menu. https://redmine.stoutner.com/issues/893
[PrivacyBrowserAndroid.git] / app / src / main / AndroidManifest.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright 2015-2022 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
7
8   Privacy Browser is free software: you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation, either version 3 of the License, or
11   (at your option) any later version.
12
13   Privacy Browser is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18   You should have received a copy of the GNU General Public License
19   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
20
21 <!-- Install location `auto` allows users to move Privacy Browser to an SD card if desired. -->
22 <manifest
23     xmlns:android="http://schemas.android.com/apk/res/android"
24     xmlns:tools="http://schemas.android.com/tools"
25     android:installLocation="auto" >
26
27     <!-- Required to load websites. -->
28     <uses-permission android:name="android.permission.INTERNET" />
29
30     <!-- Required to create home screen shortcuts. -->
31     <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
32
33     <!-- Support Chromebooks that don't have a touch screen. -->
34     <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
35
36     <!-- List the apps that Privacy Browser needs to query to see if they are installed. -->
37     <queries>
38         <!-- I2P. -->
39         <package android:name="net.i2p.android" />  <!-- Google Play flavor. -->
40         <package android:name="net.i2p.android.router" />  <!-- F-Droid flavor. -->
41
42         <!-- Orbot. -->
43         <package android:name="org.torproject.android" />
44
45         <!-- OpenKeyChain. -->
46         <package android:name="org.sufficientlysecure.keychain" />
47     </queries>
48
49     <!-- For API >= 23, app data is automatically backed up to Google cloud servers unless `android:allowBackup="false"` and `android:fullBackupContent="false"` is set.
50         `tools:ignore="DataExtractionRules` removes the warning that backups can still transfer data device to device. -->
51     <application
52         android:label="@string/privacy_browser"
53         android:icon="@mipmap/privacy_browser"
54         android:roundIcon="@mipmap/privacy_browser_round"
55         android:allowBackup="false"
56         android:fullBackupContent="false"
57         android:supportsRtl="true"
58         android:theme="@style/PrivacyBrowser"
59         android:networkSecurityConfig="@xml/network_security_config"
60         android:enableOnBackInvokedCallback="true"
61         tools:ignore="DataExtractionRules,UnusedAttribute" >
62
63         <!-- If `android:name="android.webkit.WebView.MetricsOptOut"` is not `true` then `WebViews` will upload metrics to Google.  <https://developer.android.com/reference/android/webkit/WebView.html> -->
64         <meta-data
65             android:name="android.webkit.WebView.MetricsOptOut"
66             android:value="true" />
67
68         <!-- Explicitly disable "Safe Browsing". -->
69         <meta-data
70             android:name="android.webkit.WebView.EnableSafeBrowsing"
71             android:value="false" />
72
73         <!-- The file provider is required to encrypt files with OpenKeychain. -->
74         <provider
75             android:name="androidx.core.content.FileProvider"
76             android:authorities="@string/file_provider"
77             android:exported="false"
78             android:grantUriPermissions="true" >
79
80             <meta-data
81                 android:name="android.support.FILE_PROVIDER_PATHS"
82                 android:resource="@xml/file_provider_paths" />
83         </provider>
84         
85         <!-- MainWebViewActivity.  The label uses the short name so that it isn't truncated under the icon in the launcher on most phones.
86             The theme has to be defined here or an ugly title bar is displayed when the app launches.
87             `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
88             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
89             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
90             `android:launchMode="singleTask"` makes the app launch in a new task instead of inside the task of the program that sends it an intent.
91             It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one.
92             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
93         <activity
94             android:name=".activities.MainWebViewActivity"
95             android:label="@string/short_name"
96             android:theme="@style/PrivacyBrowser"
97             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
98             android:launchMode="singleTask"
99             android:screenOrientation="fullUser"
100             android:persistableMode="persistNever"
101             android:exported="true" >
102
103             <intent-filter>
104                 <action android:name="android.intent.action.MAIN" />
105                 <category android:name="android.intent.category.LAUNCHER" />
106             </intent-filter>
107
108             <!-- Process web intents. -->
109             <intent-filter>
110                 <action android:name="android.intent.action.VIEW" />
111
112                 <category android:name="android.intent.category.BROWSABLE" />
113                 <category android:name="android.intent.category.DEFAULT" />
114
115                 <data android:scheme="http" />
116                 <data android:scheme="https" />
117             </intent-filter>
118
119             <!-- Process all content intents. -->
120             <intent-filter>
121                 <action android:name="android.intent.action.VIEW" />
122
123                 <category android:name="android.intent.category.BROWSABLE" />
124                 <category android:name="android.intent.category.DEFAULT" />
125
126                 <data android:scheme="content" />
127
128                 <!-- Process text and images. -->
129                 <data android:mimeType="text/*" />
130                 <data android:mimeType="image/*" />
131
132                 <!-- Process MHT web archives. -->
133                 <data android:mimeType="multipart/related" />
134                 <data android:mimeType="message/rfc822" />
135             </intent-filter>
136
137             <!-- Process intents for text strings.  Sometimes URLs are presented this way. -->
138             <intent-filter>
139                 <action android:name="android.intent.action.SEND" />
140
141                 <category android:name="android.intent.category.DEFAULT" />
142
143                 <data android:mimeType="text/plain" />
144             </intent-filter>
145
146             <!-- Process web search intents. -->
147             <intent-filter>
148                 <action android:name="android.intent.action.WEB_SEARCH" />
149
150                 <category android:name="android.intent.category.BROWSABLE" />
151                 <category android:name="android.intent.category.DEFAULT" />
152             </intent-filter>
153         </activity>
154
155
156         <!-- BookmarksActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
157             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
158             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
159             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
160         <activity
161             android:name=".activities.BookmarksActivity"
162             android:label="@string/bookmarks"
163             android:parentActivityName=".activities.MainWebViewActivity"
164             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
165             android:screenOrientation="fullUser"
166             android:persistableMode="persistNever" />
167
168         <!-- BookmarksDatabaseViewActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
169             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
170             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
171             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
172         <activity
173             android:name=".activities.BookmarksDatabaseViewActivity"
174             android:label="@string/bookmarks_database_view"
175             android:parentActivityName=".activities.BookmarksActivity"
176             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
177             android:screenOrientation="fullUser"
178             android:persistableMode="persistNever" />
179
180         <!-- RequestsActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
181             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
182             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
183             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
184         <activity
185             android:name=".activities.RequestsActivity"
186             android:label="@string/requests"
187             android:parentActivityName=".activities.MainWebViewActivity"
188             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
189             android:screenOrientation="fullUser"
190             android:persistableMode="persistNever" />
191
192         <!-- DomainsActivity.  `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
193             `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
194             `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
195             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
196         <activity
197             android:name=".activities.DomainsActivity"
198             android:label="@string/domains"
199             android:parentActivityName=".activities.MainWebViewActivity"
200             android:configChanges="screenLayout|keyboard|keyboardHidden"
201             android:screenOrientation="fullUser"
202             android:windowSoftInputMode="stateAlwaysHidden"
203             android:persistableMode="persistNever" />
204
205         <!-- SettingsActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
206             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
207             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
208             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
209         <activity
210             android:name=".activities.SettingsActivity"
211             android:label="@string/settings"
212             android:parentActivityName=".activities.MainWebViewActivity"
213             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
214             android:screenOrientation="fullUser"
215             android:persistableMode="persistNever" />
216
217         <!-- ImportExportActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
218             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
219             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
220             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
221         <activity
222             android:name=".activities.ImportExportActivity"
223             android:label="@string/import_export"
224             android:parentActivityName=".activities.MainWebViewActivity"
225             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
226             android:screenOrientation="fullUser"
227             android:persistableMode="persistNever" />
228
229         <!-- LogcatActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
230             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
231             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
232             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
233         <activity
234             android:name=".activities.LogcatActivity"
235             android:label="@string/logcat"
236             android:parentActivityName=".activities.MainWebViewActivity"
237             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
238             android:screenOrientation="fullUser"
239             android:persistableMode="persistNever" />
240
241         <!-- GuideActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
242             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
243             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
244             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
245         <activity
246             android:name=".activities.GuideActivity"
247             android:label="@string/guide"
248             android:parentActivityName=".activities.MainWebViewActivity"
249             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
250             android:screenOrientation="fullUser"
251             android:persistableMode="persistNever" />
252
253         <!-- AboutActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
254             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
255             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
256             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
257         <activity
258             android:name=".activities.AboutActivity"
259             android:label="@string/about_privacy_browser"
260             android:parentActivityName=".activities.MainWebViewActivity"
261             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
262             android:screenOrientation="fullUser"
263             android:persistableMode="persistNever" />
264
265         <!-- ViewSourceActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
266             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
267             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
268             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
269         <activity
270             android:name=".activities.ViewSourceActivity"
271             android:label="@string/view_source"
272             android:parentActivityName=".activities.MainWebViewActivity"
273             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
274             android:screenOrientation="fullUser"
275             android:persistableMode="persistNever" />
276     </application>
277 </manifest>