I am trying to find out whether I have to save image to external storage and then to Gallery, thus needing WRITE_EXTERNAL_STORAGE, or I can do with Fileprovider.
Is something like this possible?
Uri uri = FileProvider.getUriForFile(getApplicationContext(), Config.CAPTURE_IMAGE_FILE_PROVIDER, imageFile);
ContentValues values = new ContentValues();
values.put(MediaStore.Images.Media.DATA, uri.toString());
...
ContentResolver cr = getContentResolver();
Uri mediaStoreUri = cr.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
How do I grant READ_URI_PERMISSION to Gallery (Mediastore)?