@TekWizer samsung 20 might have android 11 not sure
thats what i thought maybe this will work @Sirous_Nekooei -
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
Many things has changed.
Could you pls give a simple example of writing and reading files (canvas as image, screenshot, and csv data)
you can find several examples after doing a search here in the community
see for example again the link provided by @TekWizer
Save a text file or an image (Canvas) in the ASD & share it on all Android versions
there was no change in reading and writing from/to the ASD - application specific directory
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)
sorry, I do not have time for that...
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...
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
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
Use variable for saving and reading
probably better to use a label, then you can see where it got saved
(nothing wrong with using the evaluate but ignore block though)
Well, it worked to some extent.
Saving is Ok, but when loading which syntax should be used?
These didn't work:
just use one of those, which are working, it does not matter which one...
sorry, that tip was wrong... this would display an image from the assets
If → DefaultFileScope is set to →
App (default) the →
fileName should be (
and the path (where the file is saved) is:
regardless of the Android version.
The Image component needs an absolute or a full path:
Thank you, now it works except something.
Taifun screenshot saving doen't work with error "....No such file or directory"
These blocks have nothing to do with your posted aia or your previously posted blocks.
Make a right mouse click on this block (Do it):
and post the result.
Three files are to be saved. the first and 3rd are save fine. The second fails.
Do It Result: ECG_Save2021/11/13 16:41--Long.jpg
Do It Result: ECG_Save2021/11/13 17:08--Short.jpg
--- (This Fails)
Do It Result: ECG_Save2021/11/13 16:41--Data.csv
Maybe there is something about Taifun screenshot?
PS: i granted the "permission to write to external memory" on screen initialize, but nothing changed.
are you using the latest version 2 of the screenshot extension?
does the example project work for you?
Of course, because the (sub) folders don't exist.
TaifunScreenshot.FileName should be e.g. like this: