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

1 Like

I also updated the first post of this topic.

3 Likes

Hello, why does this message always pop up when I use your aix extension? even Version 4 (April 19, 2022):
de.bodymindpower.downloadToAsd.aix (16.7 KB) as well.

Edit Post: I tried clearing the cache of the companion and everything is fine. sorry for the inconvenience and thank you for the aix you did. I hope you can do more aix.

2 Likes

While starting the companion app, all necessary assets and also the imported extensions of your project will be copied to your device. So in case the no such class error shows up, the extension code to run the extension is not available on your device. Without that code the companion app is not able to execute methods from the extension

Just restart the companion app and try again

Taifun

1 Like

Oh.... :open_mouth: okay that why i encountered this error. Next time it is better to restart the companion instead of clearing cached. Noted on this @Taifun Thank you so much for further explanation.

  1. You do not use version 4:

  2. AI2 nb109a → nb190a

  3. Your URL does not point to the txt file:

  4. The APK is build for me with no issues (for the first time :woman_shrugging:).

  5. Try this one: downloadToAsd_test2.aia (19.4 KB) - Companion & APK on Android 12:


Hi Anke - very strange

  1. I installed v4 over v2 and the above version was displayed - now the Browser has been rebooted it is not displayed. By the way - what does the Z mean?

  2. [quote="Anke, post:76, topic:19367"]
    Your URL does not point to the txt file:
    [/quote]

It's the path, the filename is separate (in the actual App it could be one of many)

Companion - displays a blank screen.

Installing APK:

Security threat
downloadToAsd_test appears to be malware and poses a high risk (View details). Immediate uninstallation is advised.

Details
downloadToAsd_test
This app is infected

THREATS
Virus name Evo-gen
Danger level High :roll_eyes:

No issues with that on my Pixel 4XL (Android 12).
Anyway, does the APK work for you?

What do you mean by that? :woman_shrugging:
How is the extension supposed to download a file without knowing the exact path (to this file)?

The APK works but there may be some tiny detail that causes the AV to trigger?

Why is it that this block:
Snap9

Requires the URL to include the filename, and also requires the filename separately? 8 out of 10 cats are going to think the URL should be path only.

See e.g. at post #54:

1 Like

With Date Built: 2020-11-01, I can compile and get the .apk, but when I install it the antivirus tells me it's a Trojan.

With Date Built: 2022-04-19Z , I can't compile, I get compile error.

To do the test I have simply loaded the extension, I have not added download code.

1 Like

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)