Closed Codereamp closed 11 months ago
Hi, if the issue goes away adding that line to the manifest please send a patch.
Anyhow, the mimetype we're using is the correct one and the problem lies in the program sending the intent.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
Indeed, you might want to submit a patch to RelaunchX too, so they send a valid intent: https://github.com/Leszek111/ReLaunchX/blob/bc1d07a11dc6893a1fbdd7fdd45f2cbbf1e6c282/app/src/main/java/com/gacode/relaunchx/ReLaunch.java#L98
Over a collection of epub files you might want to see which ones have invalid mimetypes buried in: https://www.mobileread.com/forums/showthread.php?t=299415
None of them should use an invalid mimetype.
Regarding android development: no program that uses MimeTypeMap or harcodes valid mimes should have a problem.
The issue is with programs that do nasty stuff, and there're many on android :/
pazos, thank you it was too quick on my side to assume the problem was on KoReader side. Filed a report at RelaunchX
@Codereamp: I submitted a patch in https://github.com/Leszek111/ReLaunchX/pull/27
It looks like @Leszek111 isn't active on github anymore.
@pazos : yes, it looks like s/he isn't. Thanks for the patch, I will have this as a an option to compile the patched APK. As for KoReader, you can probably close this issue as not planned. Only my final argument for making an exception by adding non-official type. A reply at mobileread mentioned
RelaunchX just shows 6 apps for epub, while other programs (Relaunch-1.4.4, Total Commander) show 12 apps.
This means that 6 out of 12 apps at the moment had this exception. Just a statistical argument that this might not be a big deal from the point of stability and purity :)
@Codereamp: it looks I was wrong. RelaunchX was updated a few weeks ago. The new version was released on Fdroid. It should work fine with KOReader as is :smile:
Confirmed, the association now works, thanks!
My experience on Nook Glowlight 4e with Android 8 was that when a plenty of readers were installed, opening a pure epub file from RelaunchX never listed KoReader (while listing all others). Today I indexed the sources and noticed that the AndroidManifest.xml (platform\android\luajit-launcher\app\src\main\AndroidManifest.xml ) has an entry for epub+zip file
<data android:mimeType="application/epub+zip" />
but no entry for epub.
For reference both original CoolReader and the manifest probably kept from it in the sources (base\thirdparty\kpvcrlib\crengine\android\AndroidManifest.xml) has this entry
<data android:mimeType="application/epub"/>