Can't open epub files

Describe the bug
When trying to open an epub file on Android I get a message that there are no apps to open the file with although there are a few that can.

To Reproduce
Steps to reproduce the behavior:

  1. Upload a file.
  2. Open the file object.
  3. Click on it to open it.
  4. Error. The file doesn’t open.

Expected behavior
I expected the file to be opened in one of the apps that can open epub files.

System Information:

  • OS: Android 11
  • Device Manufacturer/Model: Fairphone 4
  • Anytype Version: e.g. 0.8.2-alpha
2 Likes

This has been quite an recurring issue with the Android version.

The fundamental issue seems to be that many applications that register for being able to open a file with intent-filter in manifest cannot accept an android:scheme value of “http”, which is what Anytype sends the intent as, along with a local HTTP URL. For example, the EPUB reader (Librera Reader) only registers to handle scheme values of “content” and “file”, not “http”, explaining why it’s unable to open it from Anytype.

It looks like one solution to this would be for the Android app to download the file, make it available via a file provider and URI, then share that with the intent.

@AndroidTeam Would the proposed solution be feasible?

Is it possible somehow to download the file from the file object itself? There’s no download option anywhere there. Unless you link the file somewhere else, you can’t seem to download it.

Just tested it out and it looks like I got the same result as you. Would you mind making a feature request for that?

1 Like

Linking @isle9’s FR :slight_smile:

Therefore, closing the bug report.

Edit: reopening, I can’t read… Reopening :slight_smile: (thanks for flagging, @isle9!)

2 Likes

For anyone with this problem, Moon+ Reader seems to download the files correctly. I’d still leave the thread open in case the team want’s to try and implement @edwards idea for better compatibility with other readers.