Anke
April 10, 2022, 6:41am
6
No , if you try to save / read in / from the PrivateDir (internal storage), you don't need any storage permissions (READ / WRITE).
Your blocks are complete wrong, it should look like this:
Blocks
I see it's been two years since you were last here in the forum. Unfortunately during this time you missed a lot of things/changes that Google "forced" us to do. The entire file system has been changed.
Read here first:
From an Android point of view there are an → Internal Storage and an → External Storage .
1. Internal Storage
The Internal Storage can only be accessed with a rooted device.
1.1 The app package is saved in
/data/data/<packageName>/
In order to be able to debug your app, AI2 saves the assets for → Companion on devices with
Android ≥ 10 (API ≥ 29):
/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/assets/
Android < 10 :
/storage/emulated/0/Android/data/edu.mit.a…
Access to non-media files on Android 11+
On Android 11+, non-media files (like txt, pdf, csv, ...) can be accessed
if and only if
the text files are in the → ASD or in the → Private dir (i.e. were saved there), or
the text files are in one of the Shared folders /Documents or /Download and
these files were created by the app itself, or
SAF is used, or
MANAGE_EXTERNAL_STORAGE* permission is requested and granted.
*` This is not really an option, because an app that requests this permission…
3 Likes