glide
glide copied to clipboard
The huawei p30 or p30 pro Android 10 is particularly slow to load images, requiring a long wait before they are displayed or not displayed
use glide implementation 'com.github.bumptech.glide:glide:4.11.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
I met the same problem on huawei devices, BUT other devices like XiaoMi,vivo can finish the job quickly ....
how to fixed it ? I had the same problem
try to use
diskCacheStrategy(DiskCacheStrategy.NONE)
This issue happened for on Huawei phones, but all Android 10!!! and no solution now.
The below code will stuck when calling decodeFileDescritor(), it's not always happen. Actually all the decode methods in BitmapFactory have such issue.
Bitmap bitmap = null; try(ParcelFileDescriptor pfd = context.getContentResolver().openFileDescriptor(uri, "r")) { if (pfd != null) { FileDescriptor fd = pfd.getFileDescriptor(); bitmap = BitmapFactory.decodeFileDescriptor(fd, null, options); } } catch (Exception e) { e.printStackTrace(); }
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
I have this issue on my Nokia 7.2 (android 10) but everything is okay on Pixel 3a XL (android 10) same with version 4.10.0
After some time, some heavy inserting to MediaStore and several phone restarts the problem seems to be gone by itself
I wonder if it's better if the app has ACCESS_MEDIA_LOCATION (On Android 10/Q+)? I could imagine exif redaction making things slower
Could this problem be a bug in huawei's system? Is it IO blocking? This occurs frequently when using the following API
context.getContentResolver().openFileDescriptor(uri,"r");
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
Any ideas?
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
See https://github.com/bumptech/glide/issues/4174#issuecomment-625923930. Does adding that permission make it faster?
I seems to have finally found the real cause to this problem, this issue is not limited to just some few manufacturers but to all the android 10 devices on a whole. Be it you are targeting api 28 and below or 29, if you are on android 10, then chances are you will encounter this issues.
The real issues seems to be coming out from MediaMetadataRetriver
class of the native android system that glide uses it to retrieved thumbnails/videoframes from media file. This MediaMetadataRetriver class of android is so unreliable , that once it got stuck somewhere in the process of retrieving, the whole other retrieval process will queued up and remain stuck forever there until it recovered again from that stuck, thus leading to a huge list of blank images.
The only viable solution is - write your own glide module to retrieve thumbnails for video, FFmpegMediaMetadataRetrieval
seems to be a very good and reliable alternative to the natively available built in android ones.
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
same problem.
it looks as the system leave something opened (like some kind of filedescriptor). It looks as only happen when we are in debug mode (I'm not totally sure).
Reboot your huawei device, in my case it fixed the issue for some time.
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
Any solution ? I encounter this problem on some devices on Android 10, hundreds of pictures not displayed.
Issue is still relevant. This affects a lot of devices on android 10 including huawei. I'm using glide 4.11.0. Pictures from devices (uri like content://media/external/images/...) take a very long time to load after clearing the application cache. It can only be treated by rebooting the device.
same issue on my Nokia 7 Plus (android 10), with glide version 4.11.0
useless
你发过来的邮件怎么都是乱码啊,什么都看不到,再发一次吧。
Problem still exists on Android 10.
Does somebody have a solution?
This issue happened for on Huawei phones, but all Android 10!!! and no solution now.
The below code will stuck when calling decodeFileDescritor(), it's not always happen. Actually all the decode methods in BitmapFactory have such issue.
Bitmap bitmap = null; try(ParcelFileDescriptor pfd = context.getContentResolver().openFileDescriptor(uri, "r")) { if (pfd != null) { FileDescriptor fd = pfd.getFileDescriptor(); bitmap = BitmapFactory.decodeFileDescriptor(fd, null, options); } } catch (Exception e) { e.printStackTrace(); }
Agree with your opinion. I did a test and found that sometimes read() costs too much time. Do you have a solution now ?
I'm very open to any workarounds anyone has found that we might be able to integrate. Maybe some kind of locking on huawei devices would help avoid this state.
For ffmpeg, I don't think we'd want to integrate it into the main library. But we could probably accept it as an integration library if someone wants to contribute.
Try setting android:requestLegacyExternalStorage="true"
in AndroidManifest
Check the MANUFACTURER, if ("HUAWEI" == Build.MANUFACTURER && Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q), use load(filePath) , not to use load(uri)