Some basics on Android storage system

Yes, but how about trying it yourself?

That maybe, but Apps that circumvent the new security measures will be rejected for distribution via Google Play Store.

I don't have android 11 so I can't really get to know all the new limitations and features. But I think if there are still file manager applications in the Play Store, it will be possible. Unless all file manager applications are gone?

How do you access these filepaths on your android?

See e.g. here:

I use AndExplorer on my Android 11 device, see and actions everything it did back on Android 7, just can't access some files in the ASDs of compiled apps from my memory.

I understand. Can this file explorer move files, folders, rename, edit text files?

Yes, it does use the default text editor though.

I think the question here should be, how to save and access files from the (AI2) app when AI2 is targeting API 30 (targetSdkVersion = 30).

2 Likes

Hello,
Before the update we used to use the following paths:

  1. Companion: file:///mnt/sdcard/AppInventor/assets/
  2. APK: file:///android_asset/
    Now, what paths do we need to use? I actually did not understand much. So if anybody could help....
    I need to use those paths to show a HTML File that's already uploaded in the app inventor

Thanks

1 Like

I've added a full overview of the Android storage system - Scoped / Shared Storage (targetSdk=30, Aug 2021) - at the end of my guide.

5 Likes

I have added another detail to my overview (top right, see pink box) and thus completed the overview.
( I hope. :wink:)

16 Likes
File Export to csv
Files Acces with file component
SAF: App Inventor implementation of Storage Access Framework
Permissions problems again
Files file path (yet again)
Save or storage pdf
Ask for permission
Reading fields from a csv file
Sharing csv file
How do you import data from file on API30, API31?
Error 908: Permission Denied
SAF: App Inventor implementation of Storage Access Framework
File and Directories
Read file from phone memory
How can i convert a jpg file to pdf file?
No guarda el archivo TXT
Illegal Character In Path At Index... How to save canvas
No guarda el archivo TXT
List Documents folder with android 11
Illegal Character In Path At Index... How to save canvas
Save issue on samsung s20
Taifun FileList method not showing all the files in shared storage
Copy to shared Folder "Download" when using TaifunFile not works
Image is not save in phone
Taifun FileList method not showing all the files in shared storage
File - readfrom filename dont work
Android 11 issue related to cordova
Canvas are not saved
Storing a simple file outside of the application specific directory (ASD)
MFile - a modified version of Sunny's `EFile` extension - Shared folders - storage permissions - Android 11+
Taifun File extension still works?
Rejection of license
Activity Starter pdf open failed
CloudDB.StoreValue Block not accepting file from Shared folder
Reading CSV in App Inventor
La aplicacion no permite guardar imagenes (Canvas.SaveAs issue)
Time to RESET Forum / Documentation
EFile extension works with Companion but not with the compiled app
How do you copy file (taifunfile copyasync) to folder in internal storage (android 11)?
File not found with new version of App Inventor
How do you copy non media files from the Download folder to the app folder?
How do you save in gallery?
Error 908: The permission read_external_storage has been denied
[REBORN !] TableView Extension Versions 3&4 (pre nb191) and 5 by @Ken
How do you choose files from ASD and export them?
Need help with creating a Jigsaw Puzzle / READ_MEDIA_IMAGES → Companion App
No se puede compartir archivos, Error 908: The permission WRITE_EXTERNAL_STORAGE has been denied
Create My App Album
How do I create a separate folder in external storage?
I want to open a pdf file in app inventor
How to request and grant MANAGE_EXTERNAL_STORAGE permission
Εrror 2101:Τhe file/filename.txt coult not be found
Best method for storing and reading a folder that contains around 11k images with total of 1Gbyte
Download a file to ASD and replacing a file already there
Question about Files, Scopes and Android Levels (US and EU)
Problem to save Canvas as Image and Upload it to server with SDK > 30
Non riesco più a far caricare il file CSV dalla mia app
Changes in APK?
Files Acces with file component

#off topic
@Anke may I know how did you made this Flow chat , I mean which website are you using to make this flowchart

You can use diagrams.net

2 Likes

Thank you Anke.This chart and information are perfect and very useful...

1 Like

I made it (the adaptations) with → paint.net.

2 Likes

Really, you have perfectly depicted the storage components and their relationship, thanks @Anke

1 Like

Hi Anke, Mny thks to come back to his issue.
As i was able to save and not read, i suspected something like that. But your synoptic(overview) is crystal clear !
Have a nice WE
Loïc

2 Likes

This post is very interresting and i learned a lot.
But I don't undertand all...so i used the app below to try understandind where are files for differents scope.

App
file is stored in /storage/emulated/0/Android/data/ `packageName/files/filename

Asset
I have an error when write file:
android_asset/filename could not be created !

Cache
File exists, i can read it, but with a file manager i don't succed to find it so i don't know where it is stored...

Legacy
same as Cache

Private
same as Cache

Shared
file is stored in /storage/emulated/0/filename
I can know it exists, i can delete it, but I can't read it ! app bugs and stop...

T2File1.aia (65,8 Ko)

Is someone could help me to understand ?