Long clicking a downloaded file should give the option to either delete or share via a top menu as happens in bookmarks.

Also see #770
@mhutti1 when you say share the ZIM file in-app, do you mean to do so over a Wi-Fi connection between the two devices? And/or share a link to download that particular ZIM file?
Sharing it over a WiFi connection would be a really useful feature for users in regions with poor internet connectivity. And those users would also probably be the ones that depend the most on the app, of all the users.
For this specific issue I mean share via the standard android sharing interface.
Could you clarify what you're referring to by that? I'm only aware of Android Beam for sharing files between devices
Using the Wi-Fi P2P API directly would be a better option though - NFC might not be supported by the devices available in weaker economies. (Although using NFC makes the pairing procedure simpler for the user)

I mean share like this. If you want to share with wifi IMO the user can just install an app.
So based on the apps that generally show up in the 'Share' drawer, we want to support both sending a ZIM file (Beam, Bluetooth, Drive) and sharing the link to download it (Email, SMS, Social Media, Clipboard, Notes)?
I think in general it would be sharing the file always.
Majority of the ZIM files available are too large to be uploaded over normal data connections to a social media site or as an attachment in an email - So in situations where Internet access (when available) is not restricted, it would be better to allow the user to share just the link to the ZIM file, instead of forcing them to wait and upload the entire file.
SMS, clipboard and notes won't support sharing the actual file (only the link), so how do you want to go about email & social?
@Aditya-Sood We intend to share the file(s) between 2 devices without an internet connection. Apps like ShareIt, Mi Drop, etc can handle the transferring from one device to another. For this issue, we just need to add a share button which will open the bottom sheet as shown by @mhutti1 with ShareIt/Mi Drop/or any other app for file transfer. The user can then select the desired app for transferring the file. As @mhutti1 says, you can ask the user to download the app for file transfer if there are none on the device.
@abdulwd thanks but did you go through the whole thread?
My query essentially is:
@mhutti1 could you clarify?
Sharing a link is not really possible as it is not part of the ZIM spec. I think only sharing the file would be fine.
Okay
I'll get started then
@mhutti1 Is this issue part of 3.0 milestone?
No but if it gets done by then we will add it.
Apologies for this delay
I'll try and finish it by the end of coming weekend
Regarding the location of the option to share:
I'm planning on adding it within the WebView, so that the users would be able to share the ZIM file they are currently reading
I could alternatively/additionally add the Share option in the Downloads Library, wherein you could select multiple ZIM files for sharing. This would also require shifting the 'Delete' functionality to the new action bar that appears upon selecting the file(s).
@mhutti1 pl clarify which design flow to proceed with
Also, what's the procedure to add string translations to the string resources?
Do I simply use Google Translate for converting 'Share' to other languages and manually make the addition to the resource?
UPDATE: I'm facing difficulty in identifying/obtaining URI for the currently open ZIM file.
Despite spending 3 days on the same trying to get the file uri using getIntent() on the main activity (KiwixMobileActivity), & subsequently tinkering with methods from the ZimContentProvider, but I still couldn't obtain the direct uri to the currently open file.
Examining the logs of errors and crashes, I gather that the content provider parses and returns the HTML/CSS from the actual ZIM file. Other methods like getFilePath() didn't help either.
I can't confirm this due to lack of experience with the project on my behalf and absence of documentation, but I have a hunch that the content provider can't help me obtain the uri of the currently open file.
So I've decided to instead focus on adding the ability to share from the Downloads Library page
Update: As I went through the thread again I realised that this was how this feature had originally been requested
My bad
Regarding the location of the option to share:
I'm planning on adding it within the WebView, so that the users would be able to share the ZIM file they are currently readingI could alternatively/additionally add the Share option in the Downloads Library, wherein you could select multiple ZIM files for sharing. This would also require shifting the 'Delete' functionality to the new action bar that appears upon selecting the file(s).
@Aditya-Sood You should not add the share button within the WebView but in the downloaded books tab i.e. Device tab. You can shift the delete functionality to the contextual action bar.
UPDATE: I'm facing difficulty in identifying/obtaining URI for the currently open ZIM file.
You can try using:
Uri.fromFile(new File(ZimContentProvider.getZimFile()));
Also, you should rebase your branch on 3.0.
@mhutti1
Could you please review and give a feedback? Thanks
Could you please follow abduls advice and then I will gladly give you a review :)
On it