Using Fresco + S3 in Android

2019-08-04 20:29发布

问题:

I need a way to show several ( maybe 20-30 ) images on screen on an Android application i'm working on.

Considerations:

  • My images are stored in AWS S3.
  • The list that displays these images is implemented using RecyclerView.

After some research, i've decided to use Fresco to show and cache these images, but now i realize that i need a Uri from said S3 images.

How can i accomplish this?

Maybe using the newer TransferObserver.download(); and just display the images is better? But again, caching and recycling gets in the way.

Is there something super obvious im missing?

I've tried to use the link given at the S3 GUI but i get access denied, of course. I haven't made these images public because of security reasons.

回答1:

Fresco does support content provider URIs. So you could write your own content provider that in turn wraps an Amazon TransferObserver.