Where are the files saved when the application is compiled?

looking for an application to save files and then read them I found this block configuration that works perfect from the emulator, but when I install the apk stops working, neither saves nor reads, where is the error?
android 13
SDK version 33


Where is the file coming from?
It is already stored in shared storage, i.e. it is not owned by your app?

As it is a non media file you need SAF to access it


I create the file with the application, and save it in the following address
file:///storage/emulated/0/Documents/ if I check the indicated address with a file explorer, I see the file created with the application and when I open it I see the entered data.
in emulation mode I can read it from other applications that also run in emulation mode, but never once installed, not only from the one that I created the file.

SAF you mean this AIX ?


Because the (non media) file was first created by another app (Companion). So you must delete the file with Companion before you test with the compiled app (APK). But as @Taifun said, you cannot read this file with another app (APK) on Androi 11+ (without using SAF).

See also here for more details:

If you want to save the files on local storage and read them later then why don't you use ASD (App specific directory). It doesn't require read write permission on higher android version.

thank you all, I will try to find out which block I have to use and how to use it and try to put it into practice.

The_K_Studio do you mean this extension of yours ?

do you know where I can find an example of use?

There are many extensions to work with ASD.

You can use mine as well, whichever works for you. See below documentation for examples

hello, I have made these blocks and it allows me to save, delete and read the created files, but when I install it I get error 908 write_external_storage

any idea ?
what am i doing wrong to make it work in test and when i install it fails ?
can you help me ?

To store files in ASD you do not need any permission... when exactly does the error occur? Show us the corresponding blocks


1 Like

Remove AskForPermission block, its not required, as I can see GetFilesList block shows saved text files that means you are able to generate and save text file in the ASD.

perfect, now it works once installed, does not give errors and lets you read, write and delete

the problem was that when installing the application, generates another search path and was not created the directory where he sought the txt file and delete permisions

now it only needs to be able to read the files from another application, is it possible?

No. The ASD (App Specific Directory) is only accessible for this specific app.

If you want other app to be able to access non media files you must store them in one of the Shared folders (/Documents or /Download) and other app must then use SAF to access them. (See also my guide in post #4.)

1 Like

anke something like that ?

it does not move anything, provide other blocks and nothing, I guess it will be more complicated than just one block, I will keep looking, thanks.

with these blocks I create the files, you can see in the screenshots of the mobile, and inside are the data that I have placed

the path is :

with these blocks I try to read the files and I get the error of "permission denied" as you can see in the screenshot of the mobile phone

can you help me, I don't know where to go from here !!!!

I did a quick search in the community and found this example for you

PS don't hesitate to do a search yourself, too..

1 Like