Hi i am using @bodymindpower extension which download image in asd (application specific directory) but the images is not showing in gallery.
My question is that how whatsapp manage to show their thing’s in gallery I found path
Android/media/com.whatsapp/whatsapp/media
And whatsapp images is easily show in gallery
How can we download something in android/media folder so that we are able to show our things in gallery and user can acess it easily by going manually in filemanager
Asd is best thing but it’s not fully good as it’s automatically deleted after app uninstall so if user download something from our app and then they loose them after uninstall the app so it’s not a good deal.
Can we directly download something in media folder/packagename.
And if we download something in asd and then move or copy to android/media/package name/folder/…
So this method will work in all android version or not because storage scope is changing in new android version
@bodymindpower I have requested to you can u tell me which type of folder is supported in android 11 which is accessible by user in filemanager.
Like Our custom folder in the filemanager
Can we make our custom folder of our app and then download something on that folder is this possible in android 11?
starting with SDK30 you are not allowed to create arbitrary directories anymore…
I do not know if we can download or copy something to android/media (probably by using SAF?) but what about downloading or copying your files to shared storage, i.e. /Download or create a subfolder there?
Than how popular apps and other apps also able to create their directory in android 11
The screenshot below is of Android 11 in which you can see Telegram also have their directory.
sorry, I should have said “starting with SDK30 Android restricts accessing the file system, you should not create arbitrary directories anymore”…
you can read more about that here Storage updates in Android 11 | Android Developers
to keep it simple: use the ASD or shared storage like /Download
see also the overview by @bodymindpower
for everything else you have to use SAF which additionally requires permission from the user
As I said before I already used ASD but I want to make user accessible directory which is not deleted after user uninstall the app and the files is showing in gallery also.
And if Android 11 restricted these directory than how other app are able to do it.
As I already said, you can copy / move it (from the ASD) to one of the Shared folders
/Download
/Documents
/Pictures
/DICM
(using one of the file extensions from @Taifun or @vknow360) and then it should be shown in the Gallery and all of these shared folders are accessable by the user.
Can I directly download something to these shared folder by making a sub folder in shared directories instead of copy or cut from asd.
As asd is made for storing confidential files which is restricted from user
You can create subfolders in the Shared folders and move the file(s) from the ASD there.
And how about if you try something on your own and only then ask questions (in case there are problems)?