Anke
June 29, 2021, 11:10am
6
Giorgio_Alfonzi:
As you can see down in the image the program create a path to save every file, so I should be able to put as file name "/CSV/" and it should work. When I test it with the path "/CSV/" it says that the path /storage/emulated/0/Android/data.../CSV could not be created, it's pointing the wrong path!
No, it is written to the app-specific directory (ASD):
Companion:
/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files
compiled app (APK):
/storage/emulated/0/Android/data/<packageName>/files
Cause:
The file component (for API level ≥ 29) adds the ASD path to the beginning of each path that you declare.
If I save a text in the ASD
[grafik]
this path is returned (but doesn't exist and cannot be created):
/storage/emulated/0/Android/data/edu.mit.appinventor.aico…
See also here:
How to save a file (text, Canvas: image) read and share it on all Android versions.
[grafik]
Note:
You cannot share a text file from the → Private dir (internal storage):
/data/user/0/<packageName>/files/
Yes, on Android 11 this path is no longer visible on your device using the default FileManager.
Use Total Commander (app) or connect your device to your computer / notebook via USB and open this path from there.