I need to store images in Firebase - storage
and download them to every connected devices as soon as the image is added to the storage. However, what is the efficient way to achieve this?
- Should a Firebase-job-dispatcher be used for this purpose?
- Or is there any listener/methods that fetches the images and sync the storage?
The Download Files on Android docs from Firebase does explain various methods to retrieve the files such as : by bytes, via URL, FirebaseUI. However from the app perspective, how do I listen for any change in the storage(insertion/deletion of an image) and thereby performing operations in Firebase? If a new image is inserted, download it, or if its deleted, remove from app memory.
Any info regarding this would be much appreciated.
I'd suggest using Firebase database and having image url properties pointing to your images. This info will get synced back to client and you can then use something like Picasso to render the image (using the url).