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
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.
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).
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.
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 ?
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.)