If I "Save a media" (a picture here), it seems to put it in a place which is not easily available. I expect to have it in "Downloads" or "Pictures" like if I would take a picture with the camera or download a file with the browser. I have an Android 10.
@kelson42 I would like to work on this issue
@GearGit @kelson42 Saving directly to a public external media directory (ex. Pictures or Downloads) requires additional WRITE_EXTERNAL_STORAGE permissions which might not be wanted. What it is doing now is saving the media to the applications external media storage (does not require permissions) which will be deleted if the app is uninstalled. See this link for external storage and permission table. Is this feature still wanted?
@Frans-Lukas So Should i work on this issue or not?
Waiting to @macgills to discuss the tech. Solution.
@GearGit was first to request so I am happy to give it to them. This is very much an Android 10 problem I believe so it will require a 10 device or running the emulator to solve I would think.
I could not reproduce the issue @kelson42 was experiencing, using our existing code a picture saved for me and was instantly available in Google Photos under my albums, though it was named poorly.
The existing code can be found at KiwixWebView.SaveHandler
@GearGit was first to request so I am happy to give it to them. This is very much an Android 10 problem I believe so it will require a 10 device or running the emulator to solve I would think.
I could not reproduce the issue @kelson42 was experiencing, using our existing code a picture saved for me and was instantly available in
Google Photosunder my albums, though it was named poorly.The existing code can be found at
KiwixWebView.SaveHandler
I dont have an Android 10 enabled device yet, how should I solve this?
@GearGit You probably can not. Or maybe with the emulator.
The emulator provided by google. I can't remember if Genymotion have a free tier anymore but they were a saviour for many years
I would like to work on this issue
May I work on this issue @kelson42 ?
@4shutosh What would be your strategy to solve it?
The existing code can be found at
KiwixWebView.SaveHandler
As @macgills suggested here.
I will try on the same
And plan to make a specific folder for media within subfolders for audio(If required) and photos.
I think there wont be a issue doing this as we already have storage access for our app.
Is this issue still unresolved? I'll love to work on it.
Is this issue still unresolved? I'll love to work on it.
Yes I am working on it!
I think we should use MediaStore. @macgills What do you suggest?
Whatever works? As I said I couldn't repro Kelson's issue.
I hate Mediastore apis but if it works go for it. If anything else works, go for it.
Check the docs they don't suck as much as they used to.
Hey! @macgills Android 10 came with Scoped Storage so the Standard File APIs won't work here.
The latest Android 11 beta release also confirms this.
For Android 10 we still got a requestLegacyExternalStorage for making a file directory
(example :storage/emulated/0/Kiwix), but won't work in the future versions of Android.
Here is a guide by Fernando working with Scoped Storage using MediaStore
That is if we target it, we are not in a position to use Scoped Storage right now, we will request legacy storage when we upgrade our target sdk.
Commonsware is the guy you go to for how utterly catastrophic the scoped storage change is
Yes the targetSdk being less than 29 we can still use the older methods.
So making a easily accessible media directory on the ExternalStorage (outside the package folder) is still doable ignoring the Android 10 users, which was infact the reason behind this issue.
We can still make the directory storage/emulated/0/Kiwix for saving Pictures.
If so may I work on this?
We can still make the directory
storage/emulated/0/Kiwix
@4shutosh This is not what I requested.
Currently, on all devices the downloaded media is stored in Android/media/com.kiwix.kiwix/
I expect to have it in "Downloads" or "Pictures" like if I would take a picture with the camera or download a file with the browser.
@kelson42 Will it okay if we make it save in Downloads directory?
@4shutosh see the description
If I "Save a media" (a picture here), it seems to put it in a place which is not easily available. I expect to have it in "Downloads" or "Pictures" like if I would take a picture with the camera or download a file with the browser. I have an Android 10.
After you save media with kiwix we want it to show up in other media viewer apps without the user having to do anything about it
So it refers to Environement.DIRECTORY_DOWNLOADS or Environement.DIRECTORY_DCIM (For Camera ) or for Pictures DIRECTORY_PICTURES right?
I think it requires a workaround in KiwixWebView.handleMessage.
I will try implementing this.
Good luck!
This issue 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.
Is this issue still open @macgills? Can I work on this issue?
I would say this issue is still open, feel free to work on it @gouri-panda
This issue 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.
Hi @kelson42, can i work on this issue?
@gouri-panda good to assign this to @abhinav78910 or are you still working on this one?
No, @abdulwd I'm not currently working this one.@abhinav78910 You can go ahead!