Create My App Album

How can I create an album for my app in Gallery to save the images of Canvas?
My Blocks:

Thanks for telling me. Please now check the question.

You cannot copy / move a file to an arbitrary folder (at least not on Android 11+).
You must use one of the Shared folders, like /Pictures, /DCIM, ...

See also here:

1 Like

Can you please give a small explanation about Arbitrary Folder? I didn't know anything about Arbitrary Folder. And also I want to make a new folder for my app, I didn't want to save my canvas images in /Pictures, /DCIM, I want to save them in the app's folder like Instagram has Instagram Folder.

starting from Android 10 storing files got complicated, this Some basics on Android storage system should give you a good overview...
which means, you can't store files anywhere you like anymore... you have to store in shared storage or in ASD - application specific directory...
you also can store in subdirectories of shared storage, for example /Pictures/myCanvasImages

Instagram stores on /Android/media/com.instagram.android... I think, you also could store in /Android/media/YOUR PACKAGE NAME... but probably you need the SAF extension for this, which makes it again more complicated... just give it a try and let us know, what you find out...

Taifun

I have a similar problem. I have a variable (product list - about 30 - 50 names). This can be changed and saved in the TinyDB as list. So I want to create a list with images from Album and save it in TinyDB (like another variable also having 30 - 50 items). I want to create these functions:

  1. take a picture/photo from Album (e.g. using ImagePicker)
  2. save picture on app memory / app folder on specific index in the list

Sth like this (for all products):
TinyDB [tag "name"] > tag "description" > tag "photo"
1: ProductA > description > photoA.jpg
2: ProductB > description > photoB.jpg
3: ProductC > description > photoC.jpg
...
50: ProductZZ > description > photoZZ.jpg ...

How can I copy an image from Album to the App (but about 50 each)?

Please tell me how can I make ASD or Subdirectories of Shared Storage. And also I am confused about ASD, Shared Folders, Subdirectories of Shared Folders.

I created this, but it is only directory. I don't know how can I copy image from Album to this directory :thinking:
obraz

It's created automatically. So no need to create it.

For example:
/storage/emulated/0/Pictures/Kids

As I said, read this: Create My App Album - #4 by Anke
and see also here:

You cannot create this dir on Android 11+. You must use the ASD or one of the Shared folders.
So read my posts and the appropriate links I referenced.

This is NOT a solution (at least not on Android 11+):

@Sarthak So remove the Solution marker. Or I'll do it.

I didn't mark it as Solution. Please remove the Solution Marker. And also I read your post but now also I didn't understand what is ASD and Shared Folders. Can you please give a life example to explain these topics?

1 Like

ASD = application specific directory = only your app does have access to the files stored there
shared storage = other apps also do have access to the files stored there (therefore it is called shared storage).. hope that helps...

so according what you said earlier

the easiest solution for you if you want other apps be able to access the images is to store them in /Pictures/yourFolder or /DCIM/yourFolder

Taifun

2 Likes

Ok! Now I am able to understand this. Thanks.
So can you please tell me that how can I make a shared folder for my app.
Thanks For Your Time

All of this is described in detail in my guides.

To clarify this again:

  1. Non-media files not created by the app itself cannot be accessed by other apps
    → without using SAF or
    → request and grant MANAGE_EXTERNAL_STORAGE permission.

  2. But media files that are not created by the app itself can be accessed from any location (outside of the ASD or PrivateDir) with READ_EXTERNAL_STORAGE permission.

1 Like

As I already said:

1 Like


Now this error is coming.

Show your blocks. If this image (...Images_7.jpg) was already created by another app, you cannot overwrite it (on Android 11+). You must delete it beforehand or better use another filename (e.g.: ...Images_7a.jpg).

Note: Companion and the APK are also different apps. So if you created this file with Companion before, you cannot overwrite it with the compiled app (APK).

Below are my blocks: