[DISCONTINUED] Extension to download a file to ASD (app-specific directory) without WRITE permission

Indeed I have seen - but as a Block, repeating the filename twice will not be expected by most users when asked for the URL and filename........

I made another test from scratch using only the v4 extension. It downloads, but it cannot open the downloaded file.

Error No: 2101

Message

The file: /storage/emulated/0/Android/data/appinventor.ai_chrisward2k2.test5/files/Fruit.txt could not be found

..... that would seem to be because "files" is inserted in the ASD Path but the file is downloaded directly to the ASD?

test5.aia (19.9 KB)

borrar_GoogleDrive.aia (27.6 KB)
Date Built: 2020-11-01

Used V4 with these blocks

worked in companion (chromebook app)

Compiled, and worked on device (Google Pixel 4a / Android 13)

try_downloadASD.aia (26.7 KB)

borrar_GoogleDrive_2a.aia (19.6 KB)

@Anke, can you compile this?

try_downloadASD.aia (26.7 KB)

That's a beast :grin:

What is the build date of the V4 you used Tim? Also, can you download Fruit.txt from my website?

image

Extension says file exists, but I am unable to read it (guessing I have a file with 0 bytes ?) however, the image file I showed in my blocks has downloaded just fine, and displays OK

Do you mean 'Fruits.txt'? It is downloaded and it has content - it's 906 bytes.
You can just type the URL into your browser to see the file content
https://professorcad.co.uk/Files/Fruit.txt

That's from google drive, which seems to work without a path issue.

Try this one:
try_downloadASD.aia (18.8 KB)

With which aia? Please post it (again).

Try this: downloadASD_new.aia (18.9 KB)

1 Like

The file is not overwritten, when we download files and assign the same name they are saved as
photo.png
photo-1.png
photo-2.png
photo-3.png
...

This compiles correctly :+1:, maybe the problem occurred when updating the extension.

1 Like

Yes, I think so, too.

The easiest and fastest way is to open the aia with WinRAR / 7Zip and replace the old extension with the new (current) one.

Yes, that is known. Download only if the file does not exist (or remove the file beforehand).