2

I have a set of images that are being periodically uploaded to an Amazon S3 bucket. I need to display these images in my app. As opposed to manually writing code to handle aspects like multi-threaded downloads and caching I wanted to use Fresco to do this as I'm already using it for other tasks within my app. This answer mentions that it's possible to do this by writing a custom content provider which wraps a transfer observer. However, the specifics of doing this don't seem to be clear.

Karan Modi
  • 972
  • 2
  • 13
  • 26

1 Answers1

0

A bunch of tutorials about writing a custom content provider available. For instance: https://developer.android.com/guide/topics/providers/content-provider-creating.

Another option might be to implement a custom network fetcher which handles special URIs and queries S3 underneath: https://frescolib.org/docs/using-other-network-layers.html

defhlt
  • 1,775
  • 2
  • 17
  • 24
  • Thanks for the answer @defhit. Finding no way forward at the time, I used a workaround _AmazonS3Client.generatePresignedUrl(, key, expiration, HttpMethod.GET)_. This seems to work functionally but I'm not sure the image cache persists after url expiration. I'll update progress with your suggestion when I'm next working on the feature. – Karan Modi Mar 11 '19 at 15:03