LocalContentUriThumbnailFetchProducer not working for Android SDK>=29
Description
When using URI to load local images with ResizeOptions, eg.
Uri uri = Uri.parse("content://media/external/images/media/" + imageId);
ImageRequest request = ImageRequestBuilder.newBuilderWithSource(uri)
.setResizeOptions(new ResizeOptions(100, 100))
.build();
frescoView.setImageRequest(request);
LocalContentUriThumbnailFetchProducer is always used first. LocalContentUriThumbnailFetchProducer try to getThumbnail by MediaStore.Images.Thumbnails which was deprecated in API level 29. LocalContentUriThumbnailFetchProducer calls ContentResolver#query twice,
query("content://media/.../{id}")
query("content://media/.../thumbnails")
but has no effect when SDK>=29.
Potential Side Effects
- Performance downgrade
- Log by AppOpsManager,causing privacy concerns
Solution
For SDK>=29, ContentResolver#loadThumbnails
Additional Information
- Fresco version: 2.5.0
- Platform version: Android SDK>=29
but has no effect when SDK>=29. -- is maybe wrong,need for research
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug" or "enhancement" and I will leave it open. Thank you for your contributions.
I created an new issue and maybe it's related to this one. Please check here Video Thumbnail creation not working in Android 11 - https://github.com/facebook/fresco/issues/2655 and mark as duplicated if you think it's the case.