No se puede compartir archivos, Error 908: The permission WRITE_EXTERNAL_STORAGE has been denied

Antes se podia crear un documento en pdf y compartirlo ya sea por whatsapp u otra aplicacion, pero ya no se puede y no se como lograr corregir ese gran problema.

A alguien le a sucedido??? he intentado de todo

1 Like

If this is an existing application prior to nb187 that made use of paths outside of the constraints added in newer versions of Android, you can switch the DefaultFileScope property of Screen1 and the FileScope property of the File component to Legacy. However, this app will stop working on Android 11+ if you install it on a new device or reinstall it on an existing device due to changes in how Android restricts file access.

2 Likes

To be honest, I don't understand the question and even less the answer. And I actually thought that I was pretty familiar with Android's new file system.

1 Like

The problem with Android 11+ → "WRITE_EXTERNAL_STORAGE has been denied" has already been discussed extensively. This is of course a bug. You will find numerous links / posts for this.

2 Likes

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


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

2 Likes

My interpretation of the question is that @Miguel_Donoso is using an extension to write a PDF to the file system and is likely giving a path (or the extension assumes a path) that is no longer writable under the new model. Assuming this is an older project (i.e., this used to work "Antes se podia crear un documento en pdf"), then switching the DefaultFileScope to Legacy will restore the READ/WRITE permissions needed to do what the extension is trying to do.

2 Likes

Muchas gracias por su respuesta pero soy un poco nuevo en el tema Me gustaría saber si me puede ayudar cómo hago el proceso de DefaultFileScope a Legacy muchas gracias

1 Like

is correct, that is the problem. I have also searched in many forums, but I have not had successful results, if you maybe can help me with something I would be very grateful

1 Like

Set DefaultFileScope to Legacy in the Designer:

grafik

Does it work with Companion?
(Because the READ / WRITE permissions are always declared there.)

2 Likes

It does not work, I tried it and I get the following message ...

Captura

I notice you are forcing spaces into the file name, around the ' - '.
I have seen other users getting error messages for files with space in their names.
Try eliminating all spaces from the file name and path.

Thank you very much, before I already had it the same and it worked without problem.

I already did what you recommended me too and the error still continues

the stored pdf filename is Cotizacion-cliente.pdf
and you are trying to share the file -cliente.pdf which obviously will not work...
also you forgot a slash / after the ApplicationSpecificDirectory block...

Taifun

2 Likes

Yes great, I already did it and it worked correctly for me !!!!
Thank you

now to deal with the issue of the listview and its filters jajaja