I built some apps regarding txt file component and it worked well
and I tried to change some features then I found out there's new 'permissions' blocks
so I figured out that I needed to get permissions using the components, and this set of blocks doesn't give me ask permissions popup
rather it just comes with this alert
I can't build apps using file component anymore please help
Did you trry setting DefaultFileScope of Screen1 to Legacy?
The alert 'Error 908: ...' shows up when call permission blocks are executed. I mean the app doesn't even give me chance to get permission.
further I cannot give permission manually through settings app as shown below
It says there's no permission granted / no permission denied so I can't change anythings that has been allowed or denied
Enable the permission “Files and media”.
Oh actually I didn't know about DefaultFileScope and I'm now trying to resolve problems while changing it to legacy
thank you
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…
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 permi…
3 Likes
Thank you I think this really helps
I'm not sure I can learn it quickly so I resolve my problems soon but I will try out thank you