Android 11 no puedo guardar PDF en carpetas

It doesn't work!! :sweat:
help pleasse

/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files

1 Like

see again what I said earlier

which means, probably we will need an extension to access the shared storage

Taifun

1 Like

what exactly does not work? Can you elaborate?

@Juan_Antonio might want to help you concerning the correct path to use for the ASD in that extension
usually I would use an extension, which is able to provide the correct path both for the companion app and as well after building the project...

Taifun

Ok English is not my language but I will try to explain myself.

When I use this application on an android 9, I push the button1 and it generates a pdf file in the folder that I created with the extension Filetools (PDFapp) see attached image 1. I'm using the Filetools and KIO4_PdfS1 extension.

Now, when I use a tablet with android 11, it creates the folder but not the pdf file.

I know that the problem is from May 5 and I have to delete the WRITE EXTERNAL STORAGE, but I don't know how to replace it or get the pdf file to be saved on my tablet with android 11.

On my tablet with android 11 it does not generate the folder in /storage/emulated/0/android/data/appinventor.ai_augustomartinfPDF/files. Why will it be?

Regards!!!!

@AUGUSTO_MARTIN_FERNA
@mypat

On this page you have the latest version:
http://kio4.com/appinventor/284C_extension_crear_pdf.htm

With Android versions> = 10, use the blocks ending in 10, for example "Create10"

The files will be saved in the ASD.

Juan Antonio gracias por la respuesta, de todas formas no funciona. Entro a la carpeta donde debería estar (carpeta ASD) y no está el archivo.

No, this will become relevant when AI2 targets API 30 (Android 11), which will be the case from August 2021.

1 Like

So why doesn't it work on my tablet with android 11 and if it works on another tablet with android 10_?

How can I see which version of android my app is targeting to?

Obviously the problem is in the extension since I can create folders and take screenshoots without any problem with other extensions.

@AUGUSTO_MARTIN_FERNA

Try this example (with the finish block on another button):

pdfA11_C.aia (12.1 KB)

Antonio, mira el video. No guarda los archivos en donde debería. Que crees que sea?

@Juan_Antonio

The part below the red line is the pdf file.

La parte naranja de abajo es el archivo pdf.
Añade una imagen al VerticalArrangement

@Juan_Antonio, eso lo se. Pero el archivo .pdf no está en ninguna carpeta en el almacenamiento interno de la tablet.

This is rather a problem with your file manager not ms accessing the ASD directories.
The file is there, but you can't see it. See if your manager can have higher permissions to read files, or install another manager. Alternatively, connect the phone to the computer and check these folders on the computer.

@Juan_Antonio Observa el video que cargué. El archivo .pdf o la carpeta de la aplicación no está Android/data/...

You do not understand. In android 11, asd folders are hidden. You won't normally see them. Follow the instructions from the previous post.

Consulta lo que ha escrito @Patryk_F, el archivo está ahí en ASD, pero no puedes verlo con tu explorador en Android 11, intenta verlo desde el PC o busca en youtube otros métodos para localizar archivos en Android 11.

Excelente!! ahi veo los archivos en la pc...ahora tengo que solucionar el problema de porque no los veo en la tablet.. pero es un avance!!