View Single Post
Old 10-08-2012, 02:49 PM   #9
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,704
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by CWatkinsNash View Post
So I open Astro file manager, and just as before, everything including epubs open in Moon+ just fine from there. I even forced it to set Moon+ as the default for epub but still no joy in CC. Specifying a MIME type doesn't do anything either. (That was a long shot anyway - mobi doesn't have one set and they work just fine.)
This is becoming frustrating.

When you ask CC to open a book, it:
- looks up the mimetype for the extension using Android's MimeTypeMap. If this returns something, then use it totally unmodified.
- If MimeTypeMap returns nothing, then look up the mimetype in CC's internal table and use that.
- If CC's internal map returns nothing, then show a dialog saying that CC doesn't know what to do.
- Given a non-null mimetype, ask Android to provide a list of "intents" (applications) that can handle that mimetype, and show them to the user. If Android returns an empty list, show a dialog to the user.

Couple this with your experience, then one of the following must be true:
- The mimetype map for your tablet is returning an incorrect value for epub. What "incorrect" means in this instance is unclear. It might be as simple as letter case.
- Your tablet does not have a mimetype for epub, and CC's map is incorrect. This is possible but unlikely. Calibre's mimetype for epub is
mimetypes.put("epub", "application/epub+zip");
all lower case, which as far as I can tell is correct.
- Moon+ is advertizing a mimetype that does not conform exactly to the industry-standard mimetype. This is not a reasonable assertion, given that it works in other cases. However, all the "other cases" might be a different version of android, so we can't rule this case out.

I am leaning toward your tablet returning a mimetype in mixed case. The file manager app could be converting the mimetype to lowercase, making it work with moon+. We should probably do the same thing, although it being necessary would be astonishing.

I don't know anything about your tablet. What version of android does it run?
chaley is offline   Reply With Quote