How to save a file (text, Canvas
: image) read and share it on all Android versions.
Note:
You cannot share a text file from the → Private dir
(internal storage):
/data/user/0/<packageName>/files/
How to save a file (text, Canvas
: image) read and share it on all Android versions.
Note:
You cannot share a text file from the → Private dir
(internal storage):
/data/user/0/<packageName>/files/
great guide, thank you!
as alternative it might make sense to provide a tutorial, which stores text files or the image always in the ASD for all Android versions, so later when App Inventor targets API30 in late 2021 the app still will work...
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
This app (tutorial) will also work (for all Android versions) when AI2 is targeting API 30 → targetSdkVersion = 30
.
yes, correct... the example to store something still will work fine... sorry, I was not precise enough...
what I'm talking about is you will not be able to access the previously stored text files or images anymore outside of the ASD....
therefore it makes sense to use the ASD for all Android version already now rather than still storing in other directories
EDIT: you will only have to adjust the canvas part to always store in the ASD...
Taifun
This tutorial is incomplete without a reference for where to get that GetASD1.AppSpecificDirectory block.
Correction: It is possible!
I created these blocks from scratch and adapted them to the new File
component and the new file system. I'm still wondering whether I should update it here or create a new guide.
Any suggestions from you guys on this?
See how it works here:
Is there any wrong here ( Greater than sign )?
What i understand is that we use
if the sdk > 29, So this sign must be less than ( < )
This guide was made before the nb187
release (and of course before nb188
) and is therefore no longer up-to-date.
I answered it in the Kodular community.
(But with AI2 it is different.)
For AI2 (since the nb188
release) this is all you need to save a text file in the ASD (or in my example in a sub-folder of it) on all Android versions:
Hi. Did you create another guide?
Can you attach the aia file please?