Declare support for the Markdown MIME type
"text/markdown" for LibreOffice Viewer for Android.
Similar to CSV, make sure that the temporary file
passed to LibreOffice has a file name ending on
".md", otherwise it is imported as a plain text
file instead of a Markdown document.
This allows opening Markdown files from the Android
file manager ("Files" app) as tested successfully
on an Android AVD with API level 37 (Android 17).
However, when trying to open the file from within
the LibreOffice app ("Select file to open"), the
file is still grayed out and cannot be selected.
This will be addressed separately in upcoming commit
Change-Id: Ie071ce8770155b97dd3a70d26620560a39a7e356
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Sep 21 14:51:38 2026 +0200
tdf#173650 android: Resolve MIME type if not passed in intent
Change-Id: I6a81dd65e7ef9a233ee9b507c9e133d419cf985c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211291
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
126 lines
6.1 KiB
XML
126 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="text/markdown"/>
|
|
<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:
|
|
-->
|