Can mit app inventor make a new folder in storage

the folder in storage/emulated/0/android/data/(appname)

i want storage/emulated/0

I'm not sure if it is possible to create a directory there.

@Johannes_Ai2, do you know?

1 Like

Since targetSdkVersion = 30 (AI2 nb 188) it is no longer possible to create folders in the root directory or in an arbitrary folder of the external storage on Android 11+ devices. This is only possible there if MANAGE_EXTERNAL_STORAGE permission has been requested and granted. However, this special permission is usually not allowed by Google.

3 Likes

I don't want to take the risk

Now how do I save camera capture to ASD

Unless you're planning on publishing your app on the Google Play Store, it should be fine to use it.

1 Like

maybe i will test it

What does "app folder" mean?

I don't know why you want to save it in /storage/emulated/0. The best way is to save it in the ASD (application specific directory) with the normal File component and the Scope set to App.

1 Like

2 Likes

I don't know what you mean by 'app folder'. This saves the image in the ASD.

C.aia (2.1 KB)

1 Like

for users if it is stored in ASD it is difficult to find it

Then I would say to use Anke's method. Users can access that through a File Management application.

1 Like

how about this? @Anke @Gordon_Lu

Google Play restricts the access of Manage All Files permission. You can use these unless you are not publishing your app on Google Play.

1 Like

These blocks are never executed because the "if" query always returns "false".

grafik

2 Likes

By the way, this block creates a folder in the Private directory (internal storage) which you can access on your device only when it is rooted. (You must put a / at the beginning of the folder name or you must use FileScope = Shared)

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.