]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/AndroidManifest.xml
Detect the Google Play flavor of I2P. https://redmine.stoutner.com/issues/895
[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         <!-- Specify the Application ID used by the ads in the free flavor. -->
74         <meta-data
75             android:name="com.google.android.gms.ads.APPLICATION_ID"
76             android:value="@string/google_app_id" />
77
78         <!-- The file provider is required to encrypt files with OpenKeychain. -->
79         <provider
80             android:name="androidx.core.content.FileProvider"
81             android:authorities="@string/file_provider"
82             android:exported="false"
83             android:grantUriPermissions="true" >
84
85             <meta-data
86                 android:name="android.support.FILE_PROVIDER_PATHS"
87                 android:resource="@xml/file_provider_paths" />
88         </provider>
89         
90         <!-- MainWebViewActivity.  The label uses the short name so that it isn't truncated under the icon in the launcher on most phones.
91             The theme has to be defined here or an ugly title bar is displayed when the app launches.
92             `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
93             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
94             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
95             `android:launchMode="singleTask"` makes the app launch in a new task instead of inside the task of the program that sends it an intent.
96             It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one.
97             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
98         <activity
99             android:name=".activities.MainWebViewActivity"
100             android:label="@string/short_name"
101             android:theme="@style/PrivacyBrowser"
102             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
103             android:launchMode="singleTask"
104             android:screenOrientation="fullUser"
105             android:persistableMode="persistNever"
106             android:exported="true" >
107
108             <intent-filter>
109                 <action android:name="android.intent.action.MAIN" />
110                 <category android:name="android.intent.category.LAUNCHER" />
111             </intent-filter>
112
113             <!-- Process web intents. -->
114             <intent-filter>
115                 <action android:name="android.intent.action.VIEW" />
116
117                 <category android:name="android.intent.category.BROWSABLE" />
118                 <category android:name="android.intent.category.DEFAULT" />
119
120                 <data android:scheme="http" />
121                 <data android:scheme="https" />
122             </intent-filter>
123
124             <!-- Process all content intents. -->
125             <intent-filter>
126                 <action android:name="android.intent.action.VIEW" />
127
128                 <category android:name="android.intent.category.BROWSABLE" />
129                 <category android:name="android.intent.category.DEFAULT" />
130
131                 <data android:scheme="content" />
132
133                 <!-- Process text and images. -->
134                 <data android:mimeType="text/*" />
135                 <data android:mimeType="image/*" />
136
137                 <!-- Process MHT web archives. -->
138                 <data android:mimeType="multipart/related" />
139                 <data android:mimeType="message/rfc822" />
140             </intent-filter>
141
142             <!-- Process intents for text strings.  Sometimes URLs are presented this way. -->
143             <intent-filter>
144                 <action android:name="android.intent.action.SEND" />
145
146                 <category android:name="android.intent.category.DEFAULT" />
147
148                 <data android:mimeType="text/plain" />
149             </intent-filter>
150
151             <!-- Process web search intents. -->
152             <intent-filter>
153                 <action android:name="android.intent.action.WEB_SEARCH" />
154
155                 <category android:name="android.intent.category.BROWSABLE" />
156                 <category android:name="android.intent.category.DEFAULT" />
157             </intent-filter>
158         </activity>
159
160
161         <!-- BookmarksActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
162             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
163             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
164             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
165         <activity
166             android:name=".activities.BookmarksActivity"
167             android:label="@string/bookmarks"
168             android:parentActivityName=".activities.MainWebViewActivity"
169             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
170             android:screenOrientation="fullUser"
171             android:persistableMode="persistNever" />
172
173         <!-- BookmarksDatabaseViewActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
174             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
175             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
176             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
177         <activity
178             android:name=".activities.BookmarksDatabaseViewActivity"
179             android:label="@string/bookmarks_database_view"
180             android:parentActivityName=".activities.BookmarksActivity"
181             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
182             android:screenOrientation="fullUser"
183             android:persistableMode="persistNever" />
184
185         <!-- RequestsActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
186             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
187             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
188             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
189         <activity
190             android:name=".activities.RequestsActivity"
191             android:label="@string/requests"
192             android:parentActivityName=".activities.MainWebViewActivity"
193             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
194             android:screenOrientation="fullUser"
195             android:persistableMode="persistNever" />
196
197         <!-- DomainsActivity.  `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
198             `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
199             `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
200             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
201         <activity
202             android:name=".activities.DomainsActivity"
203             android:label="@string/domains"
204             android:parentActivityName=".activities.MainWebViewActivity"
205             android:configChanges="screenLayout|keyboard|keyboardHidden"
206             android:screenOrientation="fullUser"
207             android:windowSoftInputMode="stateAlwaysHidden"
208             android:persistableMode="persistNever" />
209
210         <!-- SettingsActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
211             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
212             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
213             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
214         <activity
215             android:name=".activities.SettingsActivity"
216             android:label="@string/settings"
217             android:parentActivityName=".activities.MainWebViewActivity"
218             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
219             android:screenOrientation="fullUser"
220             android:persistableMode="persistNever" />
221
222         <!-- ImportExportActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
223             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
224             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
225             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
226         <activity
227             android:name=".activities.ImportExportActivity"
228             android:label="@string/import_export"
229             android:parentActivityName=".activities.MainWebViewActivity"
230             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
231             android:screenOrientation="fullUser"
232             android:persistableMode="persistNever" />
233
234         <!-- LogcatActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
235             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
236             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
237             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
238         <activity
239             android:name=".activities.LogcatActivity"
240             android:label="@string/logcat"
241             android:parentActivityName=".activities.MainWebViewActivity"
242             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
243             android:screenOrientation="fullUser"
244             android:persistableMode="persistNever" />
245
246         <!-- GuideActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
247             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
248             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
249             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
250         <activity
251             android:name=".activities.GuideActivity"
252             android:label="@string/guide"
253             android:parentActivityName=".activities.MainWebViewActivity"
254             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
255             android:screenOrientation="fullUser"
256             android:persistableMode="persistNever" />
257
258         <!-- AboutActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
259             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
260             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
261             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
262         <activity
263             android:name=".activities.AboutActivity"
264             android:label="@string/about_privacy_browser"
265             android:parentActivityName=".activities.MainWebViewActivity"
266             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
267             android:screenOrientation="fullUser"
268             android:persistableMode="persistNever" />
269
270         <!-- ViewSourceActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
271             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
272             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
273             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
274         <activity
275             android:name=".activities.ViewSourceActivity"
276             android:label="@string/view_source"
277             android:parentActivityName=".activities.MainWebViewActivity"
278             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
279             android:screenOrientation="fullUser"
280             android:persistableMode="persistNever" />
281     </application>
282 </manifest>