Copy file (from assets) to Shared folder on Android < 4.4

No problem...

I tried to do the same way,but for me it's not working. I typed the 2 path the way I saw on the picture,but still not do anything.I can create folders and delete files/folders only.

Try this app:
KIOTEST_2.aia (76.2 KB)

and post a screenshot (after pressing Button1 and 2).


It has android 4.0.4.

This result doesn't make any sense at all:

grafik

Did you check if these files actually exist on your device (in /Download and /Pictures)?

Yes and it wasn't there.

Ahh, I didn't notice that. So you need READ_EXTERNAL_STORAGE permission on Android < 11, but it should be granted if you granted WRITE permission, because WRITE permission automatically grants READ permission (at least on Android < 11).

Ok, I'll check this on one of my Android 4.x test devices later...

Yes confirmed, the extension does not work on Android 4.x (and maybe also not on Android 5). @Juan_Antonio might know more...


Use the File component instead...

It will not work with file component,because it didn't copy to the download folder too.

:question: -- Blocks ...

It's the project,that you made for test earlier.There is also no file in download directory.
Képernyőkép 2024-06-25 170537

Does the file have to be saved in /Download? Wouldn't /Pictures be more suitable?

In this program after it saves to download,it would copy to that folder,but Kio4 isn't working in android 4. But I guess file1 doesn't work too,because there is no file in downloads as well.

Correction:
This statement only applies since Android 4.4 (API 19, KitKat).

So you have to request additional READ permission for Android 4.0.4.

Remove one of those slashes

Also I personally would use file scope Shared to copy something to shared storage

Taifun

1 Like

I don't, and this is one of the reasons:

It is requested in the project.(Both read and write.) I also changed "//" to "/" but it still not putting the picture into download folder.

I made some adjustments (corrections). Try this one:
KIOTEST_2a.aia (76.8 KB)

Build the APK and check...

OMG,thank you,it finally works.