Error during initial permission request

I have an application that needs to write data on memory. My problem is that as the permission is requested during execution, the first time the application is executed I receive and error message as it is not possible to access data.
When permission is done there are no more errors, but it is not nice.
How can I request for this permission before the error appears ???

Hello Jorge

We need to see your Blocks.
Right-mouse in the Blocks work area and select "Download Blocks as image".

use the AskForPermission method from the Screen drawer...


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

This is not useful. I receive the message that the permission has not been given.

It's a very wide screen. I think that the problem is that I include an Archive (28 Archives) in the screen.
I have solved this incluiding an Archive, with no use, in Screen 1. Then the permission is requested at Screen 1.

That means something to you Jorge, but the terminology you use does not make sense to us.

  1. Perhaps you could draw a schematic of how your App works?
  2. Archives. Are these Directories/Folders containing files or are they just files?
  3. What type of file - how are they produced. Do they pre-exist and get distributed with the App or does the App/App User create them?
  4. Where are you trying to store this data?
  5. Is it only the App that should have access to the files or are they available to other Apps?

I could ask a million other questions - we do not have a crystal ball. If you want help from us, you have to help us to help you! :upside_down_face:

Thanks for your help.
I will try to explain it better. I use 28 csv files I have sent previously to Appinventor, so, I include 28 Archives to get text from csv files and to set to 28 variables.
In this screen (6) I receive a permission request to access storage but it seems that before receiving the permission the program ask for any variable from csv files. Then I receive an error at the same time the permission is requested. When permission is granted there are no more errors.
Probably there is a better solution, but I have solved this getting text from a csv file in Screen 1 with no use. Then the permissions is requested but as there is no use there is no error message and afterwards at Screen 6, I do not receive any permission request (is already granted) and no error.

So you have a handle on your issue. If the files were stored in the App Assets Folder, there would be no permission required, so screen 6 could read the files directly.

Just one value per file?

The File component requires READ permission when reading from the assets.
This bug has still not been fixed. Use the EFile extension from @vknow360 instead:

1 Like

Thanks a lot !