Extension to download file(s) to ASD (app-specific directory) without WRITE permission

Here is an extension to download any file (jpg, png, txt, apk, zip, mp3, …) to the ASD (app-specific directory) without WRITE_EXTERNAL_STORAGE permission.

Version 1 (Dec 13, 2020):
de.bodymindpower.DownloadToASD.aix (9.1 KB)

At the latest when Kodular targets API 30 (Android 11, Aug 2021), the ASD will be of outstanding importance. With this extension you can download files into this directory or subdirectories in it. With API 30 (→ targetSdkVersion=30), Google no longer allows (unrestricted) access to external storage - outside the ASD (→ Scoped Storage). See also here: Some basics on Android storage system

Kodular must then also use the AndroidX libs (like AI2 is already does). As soon as this has happened, this extension can no longer be used, but the → AI2 version of this extension can / must be used that already uses the AndroidX libs (→ see in the AI2 forum).

So it will soon be necessary to adjust to this and make appropriate changes and adjustments in the projects in good time.

grafik

Example blocks

21 Likes

Great extension.

1 Like

Great Extension @bodymindpower

1 Like

Nice Extension!
Would be better if we can avoid Download manader noptification when download finish (need option “Show Notification” like with Download component).
I uncheck Visible but do not change nothing.

This will work for pdf ?

1 Like

As I said (→ any file):

Why don’t you just give it a try?

Excellent extension. Thanks.

1 Like

@bodymindpower Can you also add events for progress changes, Download Failed, Already Downloaded, etc…
Thanks for such a great extension…

More features may be added later when there is time.

1 Like

Could you please clarify if my understanding is correct?
we can use this extension for now, and it will not work once Kodular moves to AndroidX libs in another ~6 months time?

No I think this extension is working well in app Inventor so there is no problem with kodular even if their Update

correct, later you will have to use the App Inventor version, which already uses AndroidX
Extension to download a file to ASD without WRITE permission by BodyMindPower (for App Inventor)

there exist 2 different versions… so your assumption is wrong

Taifun

4 Likes

Thank you :slightly_smiling_face:

How about reading the description:

My app… downloads a zip file that is extracted so the app uses the extracted files …

With android 11 this operation fails

What shall I do Now?

Works fine on Android 11 (Pixel 2XL):

1 Like

Can you please tell me what URL it will generate means file path

For ex = I want to access my file in web viewer so I need this type of URL : file:///storage…

Tried many things nothing worked! :frowning_face:

If any user use file manager it can find this file or not???

you can find it in Android 10 or below
starting from Android 11 in a file manager the directory /Android/data will be displayed as “no data available”

Taifun