kiwix-android
kiwix-android copied to clipboard
#1447 Can't open zim from external download
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
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 Could you explain more about what is changing under the hood with libkiwix here.
@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).
Ah, yes I remember this. If no-one else is working on it by the weekend I can have a look then
@mhutti1 Great, be in touch with @veloman-yunkan to get a test libkiwix with fd support.
IMPORTANT: before merging this PR its history must be rewritten so that that the *.aar files added under core/libs are forgotten:
- the
aarfile must be removed fromcore/libsso that the latest build fromkiwix-lib-appis used instead - 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).
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 would you be able to join on slack please to deal with the details with @veloman-yunkan ?
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.
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 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?
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 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?!
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.
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.
Superseeded by #3527