Can not copy File with Taifun File-Extension

Hello everyone,

i have a problem with the file extension. I know that I have successfully copied files under Android 9 from internal storage to an SD card. I didn’t change anything in my test environment, i also updated my phone Android 10 and also updated the extension. However, copying a file is unsuccessful. Normal copying comes with an error message (file not found). Async copying simply does not copy anything. Can someone tell me where the error is. I tried everything, with relative path, absolute path, with 2, 3 and 4 slashes. Permissions are set … but not possible to copy.

Here is my very easy example:

Result is “nothing”
blocks(1)

Error “File not found”
blocks

Thanks in advance for your help.

Stefan

please read the documentation App Inventor Extensions: File | Pura Vida Apps to find out the correct syntax for the path

Prefix the filename with / (i.e. relative path) to copy a file on the SD card. For instance /myFile.txt will copy the file /mnt/sdcard/myFile.txt. To copy assets packaged with an application (also works for the Companion) start the fromFilename with // (two slashes). However you can't copy files to the assets. If a fileName starts with file:/// you can specify a complete path to the file.

after reading this you should realize, that your from path is not correct...

also read the Notes below the Copy method concerning copying files to the external sdcard... for Android 10 I doubt, that we still can access external sdcards...

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

…thanks for that, but, here are correct samples

This ist working:
WorkingCopy

This is not working (Access denied)
NotWorkingCopy

The second example (do not look at the folders, it’s only for testing) give’s me an error “access denied”, but i have access:

acess

it doesn’t work in the companion or as an app.

???

Stefan

you again might want to read this

also read the Notes below the Copy method concerning copying files to the external sdcard… for Android 10 I doubt, that we still can access external sdcards…

Taifun

hi,

thank's for that.

I doubt, that we still can access external sdcards…

So, what do you think/know ist this a limitation of App Inventor or a limitation of Android?

And how do filemanager work? They allready have access.

Stefan

I am not sure but they use SAF and ask for access to external storage.

1 Like

Read this:

Specially point 2.2:

1 Like

Hi,

i think this was/is an limitation from the Kodular internal Tool. With the last version of App Inventor, the Taifun-filetool and Android 9 it was working, since Android 10 not. That’s a fact and it is reproducible (in my inviroment).

What is not working?

Btw, what path is that: