summaryrefslogtreecommitdiff
path: root/android/app/src/main/AndroidManifest.xml
blob: 4e872370684d521663183e3c1f17d250f227a5a4 (plain)
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
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.libreoffice.androidapp"
    android:installLocation="auto">
    <!-- App requires OpenGL ES 2.0 -->
    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" /> <!-- App wants to know if device supports USB host capability(not mandatory) -->
    <uses-feature
        android:name="android.hardware.usb.host"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera"
        android:required="false" />

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:name=".LibreOfficeApplication"
        android:allowBackup="true"
        android:icon="${appIcon}"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/LibreOfficeTheme">
        <!-- SlideShow Activity -->
        <activity
            android:name="org.libreoffice.androidlib.SlideShowActivity"
            android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
            android:screenOrientation="sensorLandscape"/>

        <!-- Document Browser Activity -->
        <activity
            android:name=".ui.LibreOfficeUIActivity"
            android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
            android:label="@string/app_name">
            <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" />
                <action android:name="android.intent.action.EDIT" />
                <action android:name="android.intent.action.PICK" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <!-- The main document editing Activity -->
        <activity
            android:name="org.libreoffice.androidlib.LOActivity"
            android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.EDIT" />
                <action android:name="android.intent.action.PICK" />

                <category android:name="android.intent.category.DEFAULT" />

                <data android:scheme="file" />
                <data android:scheme="content" />

                <!-- NOTE: If adding or removing mime types below, update also
                     the list in openDocument() in LibreOfficeUIActivity.java.
                     Unfortunately I found no way to manage this from one place :-( -->

                <!-- ODF -->
                <data android:mimeType="application/vnd.oasis.opendocument.text" />
                <data android:mimeType="application/vnd.oasis.opendocument.graphics" />
                <data android:mimeType="application/vnd.oasis.opendocument.presentation" />
                <data android:mimeType="application/vnd.oasis.opendocument.spreadsheet" />
                <data android:mimeType="application/vnd.oasis.opendocument.text-flat-xml" />
                <data android:mimeType="application/vnd.oasis.opendocument.graphics-flat-xml" />
                <data android:mimeType="application/vnd.oasis.opendocument.presentation-flat-xml" />
                <data android:mimeType="application/vnd.oasis.opendocument.spreadsheet-flat-xml" />

                <!-- ODF templates -->
                <data android:mimeType="application/vnd.oasis.opendocument.text-template" />
                <data android:mimeType="application/vnd.oasis.opendocument.spreadsheet-template" />
                <data android:mimeType="application/vnd.oasis.opendocument.graphics-template" />
                <!-- Seems at least Android 5.0 does not recognize this as the mime type of .otp files. -->
                <data android:mimeType="application/vnd.oasis.opendocument.presentation-template" />

                <!-- MS -->
                <data android:mimeType="application/rtf" />
                <data android:mimeType="text/rtf" />
                <data android:mimeType="application/msword" />
                <data android:mimeType="application/vnd.ms-powerpoint" />
                <data android:mimeType="application/vnd.ms-excel" />
                <data android:mimeType="application/vnd.visio" />
                <data android:mimeType="application/vnd.visio.xml" />
                <data android:mimeType="application/x-mspublisher" />

                <!-- OOXML -->
                <data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
                <data android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation" />
                <data android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.slideshow" />
                <data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document" />

                <!-- OOXML templates -->
                <data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.template" />
                <data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.template" />
                <data android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.template" />

                <!-- OTHER -->
                <data android:mimeType="text/csv" />
                <data android:mimeType="text/comma-separated-values" />
                <data android:mimeType="application/vnd.ms-works" />
                <data android:mimeType="application/vnd.apple.keynote" />
                <data android:mimeType="application/x-abiword" />
                <data android:mimeType="application/x-pagemaker" />
                <data android:mimeType="image/x-emf" />
                <data android:mimeType="image/x-svm" />
                <data android:mimeType="image/x-wmf" />
                <data android:mimeType="image/svg+xml" />
            </intent-filter>
            <!-- HACK to support ODF files on Chrome OS, inspired by
                 https://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension

                 Seems like the ODF mime types are not available on Chrome OS,
                 so we have to explicitly match the extension.  But the ".*" is
                 not greedy, so the matching stops at the first "\\.", so we
                 have to list several variants to handle files like "blah.ugh.odt".

                 Additionally, this must not be in the above intent-filter
                 section, because the android:mimeType="*/*" would make it
                 make problems there. -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.EDIT" />
                <action android:name="android.intent.action.PICK" />

                <category android:name="android.intent.category.DEFAULT" />

                <data android:scheme="file" />
                <data android:scheme="content" />
                <data android:host="*" />
                <data android:mimeType="*/*" />

                <data android:pathPattern=".*\\.odt" />
                <data android:pathPattern=".*\\..*\\.odt" />
                <data android:pathPattern=".*\\..*\\..*\\.odt" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\.odt" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.odt" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.odt" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.odt" />

                <data android:pathPattern=".*\\.ods" />
                <data android:pathPattern=".*\\..*\\.ods" />
                <data android:pathPattern=".*\\..*\\..*\\.ods" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\.ods" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ods" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ods" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ods" />

                <data android:pathPattern=".*\\.odp" />
                <data android:pathPattern=".*\\..*\\.odp" />
                <data android:pathPattern=".*\\..*\\..*\\.odp" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\.odp" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.odp" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.odp" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.odp" />
            </intent-filter>
        </activity>

        <!-- The Activity to show license or notice -->
        <activity
            android:name=".ShowHTMLActivity"
            android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
            android:label="@string/title_activity_show_html" />

        <!-- The Settings Activity -->
        <activity
            android:name=".SettingsActivity"
            android:label="@string/app_name_settings"
            android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
            android:theme="@style/Theme.AppCompat.Light" />

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths"/>
        </provider>
    </application>

</manifest>