Hello everybody,
I have created an app that saves a file in storage.
It works fine with Huawei mate 10, but when i tested with Samsung S20 this message appears and nothing saved:
/STORAGE/EMULATED/0/"folder amd file name": open failed: ENOENT (not such a file or directory)
I tried to create the folder manually, and the message changed as following:
/STORAGE/EMULATED/0/"folder amd file name": open failed: EPERM (operation not permitted).
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.
starting with SDK30 you are not allowed to store a file in the root directory of the emulated sdcard anymore... store the file in the ASD...
see also the overview by @Anke here
Thank you.
I developed an app for my personal project last year.
Now I have to modify it so that it works on new androids.
I tried to use Anke's tutorial to use ASD, but I have problem with file path/name.
Could you pls re-write this simple project to use ASD for save/load/share ? write_read_test.aia (11.6 KB)
Thanks
Sirous
If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...
which means in your case post a screenshot of your relevant blocks...
To download the aia file, upload it to App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...
Thank you.
to save a file using the Canvas.SaveAs method, just use the filename, for example 1.jpg to save it in the ASD, you do not need all these blocks...
same for displaying it in the image component
Taifun
Well, it worked to some extent.
Saving is Ok, but when loading which syntax should be used?
These worked:
file:///storage/emulated/0/Android/data/appinventor.ai_snekooei.write_read_test/files/1.jpg
/storage/emulated/0/Android/data/appinventor.ai_snekooei.write_read_test/files/1.jpg
These didn't work:
1.jpg
/1.jpg
/files/1.jpg
/Android/data/appinventor.ai_snekooei.write_read_test/files/1.jpg