kiwix-android icon indicating copy to clipboard operation
kiwix-android copied to clipboard

#1447 Can't open zim from external download

Open macgills opened this issue 4 years ago • 15 comments
trafficstars

Fixes #1447

Introduce ZImSource concept so we no longer explicitly rely on files specifically to open a zim TODO:

  • handle db migrations
  • ensure opening video assets works
  • check navigation when app is closed, at other destinations, already open on reader
  • give some thought about how we identify bookmarks/history, currently it is possible to open the same underlying resource through 2 different methods so you could create bookmarks/history that are for the same exact thing but may present to the user as duplicates
  • remove local aar

macgills avatar Dec 10 '20 12:12 macgills

We need to be careful with this PR. I guess we will need the next official Libkwix release to be sure it works fine. Maybe not to merge immediatly when it will work.

kelson42 avatar Dec 13 '20 19:12 kelson42

@kelson42 Could you explain more about what is changing under the hood with libkiwix here.

mhutti1 avatar Dec 15 '20 17:12 mhutti1

@mhutti1 In a nutshell, to fix the two kiwix-android tickets of https://github.com/orgs/kiwix/projects/9, we have patched the libzim and libkiwix to be able to open a ZIM file from a filehandler (so far it was only possible from a filepath).

kelson42 avatar Dec 15 '20 18:12 kelson42

Ah, yes I remember this. If no-one else is working on it by the weekend I can have a look then

mhutti1 avatar Dec 16 '20 23:12 mhutti1

@mhutti1 Great, be in touch with @veloman-yunkan to get a test libkiwix with fd support.

kelson42 avatar Dec 17 '20 06:12 kelson42

IMPORTANT: before merging this PR its history must be rewritten so that that the *.aar files added under core/libs are forgotten:

  1. the aar file must be removed from core/libs so that the latest build from kiwix-lib-app is used instead
  2. removing all versions of the custom-built aar from the history will help to reduce the size of this repository (each aar is about 30MiB and there are several of them).

veloman-yunkan avatar Dec 17 '20 07:12 veloman-yunkan

Ok, I have looked at this a bit and I don't think we have a published android libkiwix lib so we can remove the .aar yet. Did we get this being built automatically?

mhutti1 avatar Dec 22 '20 17:12 mhutti1

@mhutti1 would you be able to join on slack please to deal with the details with @veloman-yunkan ?

kelson42 avatar Dec 22 '20 20:12 kelson42

This pull request has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar Dec 31 '20 02:12 stale[bot]

So I played about a bit and I would have thought opening a file from for example gmail directly would now be supported but it seems it isn't yet. Is this something we are looking for here @kelson42 ?

mhutti1 avatar Jan 01 '21 23:01 mhutti1

@mhutti1 Not sure if gmail is in the scope of tis ticket? Do you mean going to gmail with a Browser and then download a zim file in attachement? Why not just downloading fron download.kiwix.org directly in a Browser like described in the ticket?

kelson42 avatar Jan 01 '21 23:01 kelson42

Clicking the download link in chrome does work. Opening a Gmail attachment doesn't. I also had issues opening from the file browser. I think we should definitely get this working if possible.

mhutti1 avatar Jan 03 '21 14:01 mhutti1

@mhutti1 Which part of the still failing things require a fd opening? I don't think this is necessary for opening files from the file browser?!

kelson42 avatar Jan 03 '21 16:01 kelson42

So it seems if you download from gmail it works but previewing gives an opaque error. It also wont open on my samsung file browser. But I think this is probably an intent detection issue.

mhutti1 avatar Jan 07 '21 23:01 mhutti1

This pull request has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar Jan 15 '21 11:01 stale[bot]

Superseeded by #3527

kelson42 avatar Nov 11 '23 07:11 kelson42