I have granted all permissions. However, the app does not recognize this and always gives the error that it does not have write permission. The file cannot be found on the device either. Nevertheless, the text can be read. Why and where is the file. I’ve tried every scope. No file is saved anywhere. My blocks:
Your file is in the ASD, you can find if for example using Total Commander…
Ask for permission in Screen Initialize event
You only have to ask for write permission
Further things to try:
set the Default File scope in the Screen properties to Legacy and the file scope of the file component to App, also remove the / of the filename
Taifun
I tried. No file is written to the SD card. I get error 908 when asking for permission. If I omit / , the file is always saved in the app storage, isn’t it? It will certainly also be saved there, because the success message will appear and the text can be read out.
I have to add that the error comes directly when writing and no query appears.
delete all files and directories inside the ASD of the companion app (alrernatively uninstall the companion app, then reinstall), remove those 2 blocks and try again
Taifun
which Android version are you using for your tests?
Taifun
Android 13
you get that error, because the file component does not declare storage permissions anymore in the manifest, see also
which means, do not ask for permission and it works for newer Android versions…
FileSave.aia (2.1 KB)
Taifun
Unfortunately, I haven’t had the time to work on my project for a long time because of my work. Luckily that has now changed again. Thank you for your help so far. I would like to save a file in my mobile phone’s download folder. So not only in the private memory of the app. But that doesn’t seem to be working
You might want to provide a screenshot of your relevant blocks
Taifun
The code is still the same as on my last sent screenshot.
If you want to store in folder /Download
, then you should use this filename
/Download/myTest.txt
Taifun
I was using File Scope Legacy and getting the 908 Permissions error as always. But it was queried beforehand and I confirmed it.
Try the MFile extension
Taifun
I tried.
But here the file is only saved in the App folder. Not in a normal public folder. I’ve tried a lot with the extension, unfortunately nothing has led to success.
Are there any other solutions? Haven’t you had any problems with it yet?
show us the Do it result
Taifun
as you can see yourself, you are storing the file in ASD…
what about using the path /Download/Test.txt
to store it in shared storage /Download
?
Taifun