On my Iconia A200, I'm using CC and Moon+ Pro. I am unable to open any format other than PDF in Moon+ from within CC. Other formats report that no app is answering the call.

What I've done:

Uninstalled and reinstalled both apps. No luck.
Cleared data on both apps. Still no luck.

Moon+ can import and open these files (epubs) just fine, and I can also open them from a file browser - just tap the file and it opens in Moon+. But I still can't get them to open from within CC. This makes me sad.

Since you mentioned in the other thread that you're using Moon+, have you had any problems with Moon+ not reporting itself as an epub or mobi reader? I have the paid Pro version, and it shows up as a pdf reader option in CC, but won't answer calls for other formats.

Quote:

Originally Posted by DoctorOhh

I too have the paid version and have no trouble using it as a ePub reader via CC.

I stopped importing anything into Moon+ and use CC to open all my books with Moon+….

I haven't had any problems with various formats in Calibre Companion or Moon+ Reader Pro paid version. I too manage and open books from Calibre Companion, using these settings in "Book Formats and Folders": Default folder: /storage/sdcard()/Calibre_Companion/. Checked: epub (default folder), pdf (default folder).

My settings in calibre Preferences -> Device Interface plugins -> Android Driver -> Select available formats and their order for this device: Checked: epub, pdf. This plugin is disabled, but even disabled I wonder if it still may have something to do with your problem (?). In Calibre Companion I use Connect as Wireless Device, in which case (I assume) Calibre Companion uses the Device Interface plugin SmartDevice App Interface, which doesn't list available formats for device.

Quote:

Originally Posted by CWatkinsNash

Since this is turning into an unintentional thread hijack, I'll post this over in the devices subforum.

I didn't consider it a hijack.

Quote:

Originally Posted by DoctorOhh

I'm a little confused, I suspect that you make some other app the default for ePub. When you open a ePub from CC does it open in any other app? If so you need to clear the defaults of that app….

If the formats you send (EPUB, MOBI) show up in CC on device, it's got to be a problem on the device end…. I looked in Moon+ Reader Pro but didn't see any settings that might limit the formats it deals with. I'm too new to Android to even know how to specify which app deals with which file extension (as suggested by DoctorOhh). Didn't see a way to do that in Settings -> Apps. But maybe Clearing data and cache for all the other reading apps on the device will help. For all my reading apps on device, in Settings -> Apps, Launch by Default has no defaults set.

I'm using it via the content server almost exclusively. I only connected as a wireless device when I cleared the data and had to resync the metadata for the books already on the device.

How Android deals with defaults - basically, if there's only one option, it uses it. If there are more options, it presents a list of apps you can choose from, and at that time you can select to make your choice the default. This is true regardless of whether you are in CC, or a file browser, or any other app trying to open a file or carry out a command. It is the apps themselves which "announce" to Android what files or commands they can handle. If an app does not make this announcement, one has to open files from within the app instead. But that's not the case here. Since Astro automatically opens the files in Moon+, that tells me that Android knows Moon+ to be the app for those files. It just isn't letting CC in on the conversation for some reason.

I no longer have any other reader apps installed except for Kindle and Google Play Books, and neither of those "announce" themselves as "file openers" - they both operate in their own universe. Neither have any defaults set.

I'm using it via the content server almost exclusively. I only connected as a wireless device when I cleared the data and had to resync the metadata for the books already on the device.

How Android deals with defaults - basically, if there's only one option, it uses it. If there are more options, it presents a list of apps you can choose from, and at that time you can select to make your choice the default. This is true regardless of whether you are in CC, or a file browser, or any other app trying to open a file or carry out a command. It is the apps themselves which "announce" to Android what files or commands they can handle. If an app does not make this announcement, one has to open files from within the app instead. But that's not the case here. Since Astro automatically opens the files in Moon+, that tells me that Android knows Moon+ to be the app for those files. It just isn't letting CC in on the conversation for some reason.

I no longer have any other reader apps installed except for Kindle and Google Play Books, and neither of those "announce" themselves as "file openers" - they both operate in their own universe. Neither have any defaults set.

Thanks for the info about how Android deals with selecting which App to open which file.

I'm stumped. I couldn't replicate the problem. That is with calibre 0.9.1 on OS X 10.8.2, connecting to content server from Calibre Companion 2.2.2 on Android 4.1.1 on a Nexus 7.

I no longer have any other reader apps installed except for Kindle and Google Play Books, and neither of those "announce" themselves as "file openers" - they both operate in their own universe. Neither have any defaults set.

I too only have Moon+ as a reader app and when I select an epub in CC it opens up straight to Moon+.

When you open a epub from a file browser it opens in Moon+ fine?

Is the difficulty opening from CC only when you are connected to the content server, wirelessly connected, when not connected, or all three?

On the surface it seems to be unique to your tablet, maybe chaley can lend some insight.

@CWatkinsNash: it sounds like extension-to-app mapping on your tablet has been corrupted in some way. The oracle of google finds reports of this happening if apps are selected to be the default for a mimetype (extension), then uninstalled.

Things I would try:

- Go to settings -> apps -> Moon+ and check what is in the "Launch by default" setting. It is probably empty, but it is worth the check.

- Reinstall the other readers. For each one, verify that it is not the default reader app for that type (same as above). I think you will find that your tablet "remembered" some setting. Clear all the "launch by default" for each app. Then uninstall again. While they are installed you might also check if CC finds any of these apps, just to verify that android "intent" mapping works at all on your device.

Thank you Walt and Charles for your efforts. Of all the weird problems to have... But then, I do tend to get the odd ones.

I did as suggested and reinstalled the reader apps (FBReader & Aldiko) and checked the defaults - none were set. I then cleared data on everything involved (including CC), still no luck. I still got the "no app answering the call" dialog on epubs. Interestingly, I do now get options for mobi (including Moon+), which was not the case yesterday. So now we're down to just epubs being an issue.

In the file browser, selecting an epub now presents all expected options - FBreader, Moon+, and Aldiko. Just for kicks, I selected to use Moon+ as the default. Went back to CC, cleared data, rescanned, and still "no answer".

Since I was looking for an excuse to tinker anyway, maybe today is a good day to install a custom ROM. I've been unlocked and rooted since day two of having the tablet, so all I needed was a reason. I'm gonna go make a nandroid and get started.

While in the CWM recovery menu I realized that I actually like the stock ROM and really didn't want to invite "experimental issues", so I went for a wipe and factory restore. When it rebooted after and I went through setup, I made sure to uncheck the Google restore options. I even removed the SD, copied all backup and recovery directories to the computer and deleted them from the SD.

Every single bit (no pun intended) of everything was reset to factory.

Installed Moon+ Pro. Started it up once. Installed CC. Started it up, made preferred changes to formats / folder locations. Connected to CS and downloaded some books in all three of my formats - epub, pdf, mobi. (I should note that nothing in calibre has DRM, so that's never an issue.)

Selected a PDF - opened in Moon+
Selected a mobi - opened in Moon+
Selected an epub - Moon+ did not pick up the call.

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.)

At this point I'm ready to give up on having CC be my main interface for browsing my books. I love it but there's obviously a problem specific to my tablet that I can't get around without more drastic measures. My earlier experiments showed that using a different reader app doesn't fix the epub issue either.

Thanks to the three of you for your help. At some point I may take another swing at it but right now I'm moving on to the other fun things my tablet does. CC is still very useful to me even without this.

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?

Data Type matches if any of the given values match the Intent type. The Intent type is determined by calling resolveType(ContentResolver). A wildcard can be used for the MIME sub-type, in both the Intent and IntentFilter, so that the type "audio/*" will match "audio/mpeg", "audio/aiff", "audio/*", etc. Note that MIME type matching here is case sensitive, unlike formal RFC MIME types! You should thus always use lower case letters for your MIME types.

It appears that we should not trust the mimetypes returned by the android devices, instead converting them to lowercase. We will make this change in CC.

FWIW: android it totally wrong in this. mimetypes are defined in the various specs as being case-insensitive.

Interesting findings on the mimetypes. I'll wait for the update and see if that makes any difference. In the meantime I might play around with the mimetypes some more. Especially since Astro lets me reset them with one button.

Interesting findings on the mimetypes. I'll wait for the update and see if that makes any difference. In the meantime I might play around with the mimetypes some more. Especially since Astro lets me reset them with one button.

CC 2.3 uses a different mechanism for launching readers, where it (CC) manages selecting the default app itself. It also detects the presence of Kindle for Android and gives it as a reader option if it makes sense: an amazon format stored in the /kindle folder.

Germane to this discussion, CC now forces mimetypes to lowercase before looking up apps that can handle it. I hope that solves the problem you are having.

Germane to this discussion, CC now forces mimetypes to lowercase before looking up apps that can handle it. I hope that solves the problem you are having.

Sort of. I can now open epubs in every epub app except Moon+. If you recall, previously even when I had three epub-compatible apps installed, nothing answered the call for epub, but now it's only Moon+ that's not answering.

It sounds like there was a combination of issues and this update fixed the biggest one. I'm happy now.

I can definitely work with this. I actually don't mind having two different readers because of the type of content I'm using on the tablet, and also because I can now use CC as my frontend, it doesn't matter so much *what* they open in, just that they open.

Sort of. I can now open epubs in every epub app except Moon+. If you recall, previously even when I had three epub-compatible apps installed, nothing answered the call for epub, but now it's only Moon+ that's not answering.

I wish I understood why this happens on your tablet but not on any other.

Of course, it could be happening on lots of tablets and we aren't hearing about it. It isn't happening on the nexus 7 or galaxy nexus, but that doesn't mean much.

Quote:

It sounds like there was a combination of issues and this update fixed the biggest one. I'm happy now.

I can definitely work with this. I actually don't mind having two different readers because of the type of content I'm using on the tablet, and also because I can now use CC as my frontend, it doesn't matter so much *what* they open in, just that they open.