diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-10-25 14:22:52 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-10-26 18:46:43 +0200 |
commit | 097e4ff75e88886533c23f46f777661dc79217a4 (patch) | |
tree | b00df4299f02d44a9541051330a1359583fe3a75 | |
parent | e8a1504407311ce0269926797671951fa55b4134 (diff) | |
download | mupdf-097e4ff75e88886533c23f46f777661dc79217a4.tar.xz |
Fix 697233: Add FB2 file type to mobile viewers.
-rw-r--r-- | platform/android/viewer/AndroidManifest.xml | 14 | ||||
-rw-r--r-- | platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFActivity.java | 2 | ||||
-rw-r--r-- | platform/ios/Info.plist | 29 |
3 files changed, 45 insertions, 0 deletions
diff --git a/platform/android/viewer/AndroidManifest.xml b/platform/android/viewer/AndroidManifest.xml index 78dcce1d..36e12b3a 100644 --- a/platform/android/viewer/AndroidManifest.xml +++ b/platform/android/viewer/AndroidManifest.xml @@ -54,6 +54,11 @@ <intent-filter> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> + <data android:mimeType="text/xml"/> + </intent-filter> + <intent-filter> + <action android:name="android.intent.action.VIEW"/> + <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="file"/> <data android:mimeType="*/*"/> @@ -87,6 +92,15 @@ <data android:pathPattern=".*\\.epub"/> <data android:host="*"/> </intent-filter> + <intent-filter> + <action android:name="android.intent.action.VIEW"/> + <category android:name="android.intent.category.DEFAULT"/> + <category android:name="android.intent.category.BROWSABLE"/> + <data android:scheme="file"/> + <data android:mimeType="*/*"/> + <data android:pathPattern=".*\\.fb2"/> + <data android:host="*"/> + </intent-filter> </activity> <activity android:name="OutlineActivity" diff --git a/platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFActivity.java b/platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFActivity.java index ca384015..90270f5e 100644 --- a/platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFActivity.java +++ b/platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFActivity.java @@ -107,6 +107,8 @@ public class ChoosePDFActivity extends ListActivity { return true; if (fname.endsWith(".epub")) return true; + if (fname.endsWith(".fb2")) + return true; if (fname.endsWith(".png")) return true; if (fname.endsWith(".jpe")) diff --git a/platform/ios/Info.plist b/platform/ios/Info.plist index 3f3d814d..256165c4 100644 --- a/platform/ios/Info.plist +++ b/platform/ios/Info.plist @@ -64,6 +64,18 @@ <string>org.idpf.epub-container</string> </array> </dict> + <dict> + <key>CFBundleTypeIconFiles</key> + <array/> + <key>CFBundleTypeName</key> + <string>EPUB</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + <key>LSItemContentTypes</key> + <array> + <string>org.fictionbook.fb2</string> + </array> + </dict> </array> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> @@ -214,6 +226,23 @@ <string>application/epub+zip</string> </dict> </dict> + <dict> + <key>UTTypeConformsTo</key> + <array> + <string>public.data</string> + </array> + <key>UTTypeIdentifier</key> + <string>org.fictionbook.fb2</string> + <key>UTTypeTagSpecification</key> + <dict> + <key>public.filename-extension</key> + <array> + <string>fb2</string> + </array> + <key>public.mime-type</key> + <string>text/xml</string> + </dict> + </dict> </array> </dict> </plist> |