ChiliLabs / ChiliPhotoPicker

Photo picker library for android. Let's you pick photos directly from files, or navigate to camera or gallery.
Apache License 2.0
405 stars 45 forks source link

BUG: No preview of photos #7

Open mgursch opened 4 years ago

mgursch commented 4 years ago

Hello,

I integrated your library into one of my apps but Its showing some weird behavior. First I open the PhotoPickerFragment - everything works. I choose 1-2 pictures. Second the user opens the PhotoPickerFragment again, but image previews are not visible. If the user navigates to gallery and back, previews are back.

I attached a link to a video for better understanding.

https://www.dropbox.com/s/0aquo1lqvs4ybci/photopicker-empty.mp4?dl=0

APetjko commented 4 years ago

Which library do you use for ImageLoader?

mgursch commented 4 years ago

Glide with your demo implementation

JasonPosterUpd commented 4 years ago

the same

mgursch commented 4 years ago

@APetjko How can I help to get a solution for that?

APetjko commented 4 years ago

As I can see, you run app on Android Q. Tried to reproduce on emulator with this version, but succeed only partially.

Images was not loaded at all (but it is know issue on Glide repository - https://github.com/bumptech/glide/issues/3896). You can try suggested in this issue solution, but i'm not sure that it will help you.

Can't reproduce your case.

@mgursch maybe you have some additional configurations for Glide? (extended AppGlideModule, Caching, etc.)

mgursch commented 4 years ago

I tried to switch to Picasso for ImageLoaderDelegate and it works. Maybe there is some missconfiguration or Glide issue

APetjko commented 4 years ago

Do you experience this issue on pre-Q versions?

mgursch commented 4 years ago

Sorry - havent checked it on other phones.

ridsync commented 3 years ago

There is a problem with the preview of the photo. this issue is discovered in sample library app with Samsung SM-G975-N Android 10 device

image

timtsj commented 3 years ago

@ridsync try add this to file path of you file provider

<cache-path
    name="camera"
    path="camera/" />
<external-path
    name="external_files"
    path="." />
<external-path
    name="cache-path"
    path="." />
<cache-path
    name="cache-path"
    path="." />
<external-path
    name="external"
    path="." />
<external-files-path
    name="external_files"
    path="." />
<cache-path
    name="cache"
    path="." />
<external-cache-path
    name="external_cache"
    path="." />
<files-path
    name="files"
    path="." />
starsep commented 3 years ago

Adding android:requestLegacyExternalStorage="true" to application tag in AndroidManifest.xml worked for me. More info on temporarily opting-out of scoped storage: https://developer.android.com/training/data-storage/use-cases#opt-out-scoped-storage