I want to make a lib like a photo album and adapt it into Android Q
Because of the Scoped Storage, the MediaStore.Images.ImageColumns.DATA
was deprecated;
We can't read the file directly by the path like /storage/emulated/0/DCIM/xxx.png
MediaStore.Images.ImageColumns
has no value like URI, So I can't get the picture by ContentProvider.
We can open only one picture in this way (the code under), and received one URI in the callback;
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
// Filter to only show results that can be "opened", such as a
// file (as opposed to a list of contacts or timezones).
intent.addCategory(Intent.CATEGORY_OPENABLE);
// Filter to show only text files.
intent.setType("image/*");
But I want to access all the picture, So, How can I scan all the pic in Android Q?