How do you delete a file in folder Download?

Ok, of course, you cannot delete a file (media or non-media file) that is not created by the app itself on Android 11+. And also you cannot accesss media files on any Android version that is not created by the app without READ permission (on any Android version, as I already told you).

So you need SAF to delete a (media) file on Android 11+ (if the file is not created by the app).

Back to post # 7 then :wink:

1 Like

Yes, or this

but if someone only needs the delete method, then your small extension is sufficient.

I have simplified the TESTICON .aia as much as possible and will send it to you. I also have a recording that I would like to send you of the download and deletion operation. How do I send it to you?
TESTICON.aia (9.8 KB)

If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...

which means in your case post a screenshot of your relevant blocks...

To download the aia file, upload it to App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...
Thank you.

Taifun


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

OK forget it

I got the test aia project to work OK once I had added a second activityStarter, so one for opening the website, and one for deleting a file. This downloaded a file, and i was then able to delete that file.

1 Like

good thanks everyone.

The disadvantage of this method is that it does not necessarily open the correct directory (but the last one opened). Therefore, I would generally prefer the SAF method.

Note: Of course you need READ permission on all Android versions for listing the images (here TaifunFile method).

I tried your suggestion. Accessing Downloads works and I get a list of png files, but this list is disabled.
You also say that I have to give read permissions, I tried with SAF, but what do you mean?

It is correct as I put it. If I put it as you say gives me 'no images to delete' msg.
The problem is that the list shown is disabled.

Try this one:

I used exactly the same blocks as posted. Click the red botton "Delete icon" top left.

With the red delete I get no images.
With the black delete (2 ActivityStarter) is OK.


Are you sure there are images (PNG or JPG files) in the /Download folder? Post a screenshot of this directory of your device.

Android version?

TESTICON._2a.apk
Download from icons8 not working
Refresh not working
No list no way to try to delete
And YES png files in Download folder

Android version 12