Files
odfstudio/android/source/AndroidManifest.xml
Michael Weghorn 7112f29a73 android: Set installLocation="auto" in Manifest
This allows flexibility on where the app gets installed,
either on internal or external storage, see [1].

Explicitly prefering external location was originally
introduced in

    commit 015e1b8444
    Date:   Fri Jun 28 09:48:41 2013 +0200

        android: prefer external storage in DocumentLoader / LibreOffice4Android

        With this, these apps can be used even if /data is something like 128MB,
        e.g. on normal phones, not tablets / emulators.

, but there seems to be no particular reason for that any more these
days, as either internal or external are fine (and internal
device storage tends to be larger these days as well).

For the debug build configuration, install location was
set to "internalOnly" in

    commit 02119a79c1
    Date:   Mon Oct 13 10:19:25 2014 +0200

        android: When debugging, the installLocation must be "internalOnly".

        Otherwise the gdbserver ends up with

        run-as: exec failed for /data/data/org.libreoffice/lib/gdbserver Error:Permission denied

        (you need to run ndk-gdb with --verbose to see that).

temporarily, but then was already "auto" since

    commit 66518ead51
    Author: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
    Date:   Thu Aug 31 11:50:51 2017 +0200

        use extractNativeLibs="false" for less disk usage and faster installation

        [...]

        also revive installLocation attribute to allow installation on external
        storage and move from manifestPlaceholders from defaultConfig to release
        buildType (as otherwise gradle complains about having "Multiple entries
        with same key")

Using 'installLocation="auto"' is also a requirement
for the Meta Horizon Store, see [2].

[1] https://developer.android.com/guide/topics/data/install-location
[2] https://developers.meta.com/horizon/resources/publish-mobile-manifest/

Change-Id: Ie40dddbf2886f0693bcd38b7eed85916e2319343
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209420
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 1a18114fce)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209426
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2026-08-21 14:51:07 +02:00

125 lines
6.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto">
<!-- App requires OpenGL ES 2.0 -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<application
android:name=".LibreOfficeApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/LibreOfficeTheme"
android:hardwareAccelerated="true"
android:largeHeap="false">
<!-- Viewer Activity -->
<!-- When changing android:windowSoftInputMode, please don't specify multiple "adjust..." or "state...". -->
<activity
android:name=".LibreOfficeMainActivity"
android:configChanges="orientation|keyboard|keyboardHidden|screenLayout|uiMode|screenSize|smallestScreenSize"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<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="content"/>
<!-- Please keep this in sync with FileUtilities.java. -->
<!-- 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.visio2013" />
<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>
</activity>
<activity
android:name=".SettingsActivity"
android:label="@string/app_name_settings">
</activity>
<!-- Document Browser Activity -->
<activity android:name="org.libreoffice.ui.LibreOfficeUIActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".PresentationActivity"
android:screenOrientation="landscape" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".LibreOfficeMainActivity" />
</activity>
<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/file_paths" />
</provider>
</application>
</manifest>
<!-- vim: shiftwidth=4 softtabstop=4 expandtab:
-->