🔥🖼 Display images stored in Cloud Storage for Firebase using Coil

Related tags

Kotlin firecoil
Overview

Build Status

firecoil

firecoil allows you to load images from Cloud Storage for Firebase in your Android app (through a StorageReference) , using the image loading library Coil.

Usage

Basic Usage

val storageRef: StorageReference = ...
val imageView: ImageView = ...

imageView.load(storageRef)

Custom Requests

val storageRef: StorageReference = ...
val imageView: ImageView = ...

imageView.load(storageRef) {
    crossfade(true)
    placeholder(R.id.placeholder)
}

See more usage options on the Documentation.

A sample app is also available for trying out firecoil.

Contributing

Anyone and everyone is welcome to contribute. Please take a moment to review the contributing guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgment

Inspired by FirebaseUI for Storage

Comments
  • Coil logger support

    Coil logger support

    Ability to view the log information while processing the image. Currently it doesnot support it.

    I had implemented ImageLoaderFactor in the Application Class with the following snippets:

    return ImageLoader.Builder(this) .availableMemoryPercentage(0.25) // Use 25% of the application's available memory. .crossfade(true) // Show a short crossfade when loading images from network or disk. .componentRegistry { add(StorageReferenceFetcher()) } .apply { if (BuildConfig.DEBUG) { logger(DebugLogger(Log.VERBOSE)) } } .build()

    Ok, never mind. just found out that you can have your own imager loader by using

        FireCoil.setDefaultImageLoader(newImageLoader())
    
    opened by subashz 1
  • chore: update dependencies and gradle

    chore: update dependencies and gradle

    This PR should update our dependencies:

    • Coil (1.3.0)
    • Firebase Storage (20.0.0)
    • Kotlin (1.5.20)
    • Kotlin Coroutines (1.5.0)
    • Gradle (4.2.2)
    • Google Services Plugin (4.3.8)
    opened by thatfiredev 0
  • refactor: update to Coil 0.10.0

    refactor: update to Coil 0.10.0

    This PR should update coil to 0.10.0. Also:

    • BREAKING: updates ImageLoader.execute(GetRequest) to return RequestResult (due to coil-kt/coil#349)
    • updates buildTools to 29.0.3 (travis included)
    • updates coroutines to 1.3.5
    • updates gradle to 3.6.2
    • adds diskCachePolicy for decode options on our test
    opened by thatfiredev 0
  • refactor: set mimeType to null on StorageReferenceFetcher

    refactor: set mimeType to null on StorageReferenceFetcher

    Fetching the metadata only to get the mimeType can have a small impact on performance, since we're making a second network call in order to retrieve it. I suggest we keep the mimeType null, and if the user needs to get it, they should call "getMetadata()" on the StorageReference instead.

    opened by thatfiredev 0
  • chore: add travis configuration for CI

    chore: add travis configuration for CI

    Adding Travis for Continuous Integration. It contains different configurations for testing branches and Pull Requests. I've opened this PR to see if both succeed.

    opened by thatfiredev 0
  • Add support for diskcache

    Add support for diskcache

    Hello,

    For a project, I was trying to do the same thing as you but using Jetpack compose and the Composable AsyncImage from the Coil library.

    Using your StorageReferenceFetcher and StorageReferenceKeyer classes and a custom ImageLoader is working correctly but your StorageReferenceFetcher does not support diskCache.

    Reading the source code of the HttpUriFetcher class from the Coil library, in order to add diskcache support, we need to read and write into the diskcache into the fetch method.

    But I cannot find a way to implement a working way to do that. Did you already did that? Thank your for your help :)

    opened by ludovicroland 2
  • Not compatible with Compose

    Not compatible with Compose

    Firstly, thanks so much for creating this library. This is super useful and exactly what I was looking for to make handling StorageReferences and their subsequent retrieval of download URLs a breeze.

    However, I've written a screen in Compose where I want to utilise this library and image loading. Typically you would do this: Image(painter = rememberImagePainter(thumbnailUrl))

    But passing a StorageReference to rememberImagePainter which is Coil's solution to loading images in Compose does not work. Are you planning to add support for Compose?

    Thanks in advance!

    opened by edwoollard 6
Releases(2.0.0-rc03)
Owner
Rosário Pereira Fernandes
Google Developer Expert for Firebase | Associate Android Developer | Community Leader at GDG Maputo
Rosário Pereira Fernandes
An android app built using Kotlin that consumes Pixabay API to display images and their details.

AdanianAndroidTest An android app built using Kotlin that consumes Pixabay API to display images and their details. It has been built following Clean

Joel Kanyi 6 Jul 12, 2022
A minimal notes application in Jetpack Compose with MVVM architecture. Built with components like DataStore, Coroutines, ViewModel, LiveData, Room, Navigation-Compose, Coil, koin etc.

Paper - A Minimal Notes App A minimal notes application in Jetpack Compose with MVVM architecture. Built with components like DataStore, Coroutines, V

Akshay Sharma 139 Jan 2, 2023
Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow..

Nextflix-Composable A Clean Architecture App to show use of multi-module-architecture in a Jetpack Compose. The modules are as follow: app: Presentati

Talha Fakıoğlu 198 Jan 1, 2023
A Flutter implementation of Salesforce Marketing Cloud for iOS and Android

sfmc_flutter A Flutter implementation of Salesforce Marketing Cloud for iOS and Android. Features Setup Marketing Cloud (iOS and Android) Support for

Alex Tarragó 5 Oct 19, 2022
DocuBox is a cloud based file storing app where you can securely store and access your documents from anywhere around the world

DocuBox is an android app ??in which you can securely upload your files on the cloud– from family pictures and audio recordings to spreadsheets, presentations and other confidential documents.

Vaibhav Jaiswal 26 Jan 3, 2023
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.

Themis provides strong, usable cryptography for busy people General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), An

Cossack Labs 1.6k Jan 8, 2023
:blowfish: An Android & JVM key-value storage powered by Protobuf and Coroutines

PufferDB PufferDB is a âš¡ key-value storage powered by Protocol Buffers (aka Protobuf) and Coroutines. The purpose of this library is to provide an eff

Adriel Café 94 Dec 7, 2022
A local storage management library for Kotlin Multiplatform Mobile iOS and android

A local storage management library for Kotlin Multiplatform Mobile iOS and android Features iOS and Android local storage in one interface Provides ge

LINE 20 Oct 30, 2022
Flutter plugin that leverages Storage Access Framework (SAF) API to get access and perform the operations on files and folders

Flutter plugin that leverages Storage Access Framework (SAF) API to get access and perform the operations on files and folders.

Vehement 8 Nov 26, 2022
A modular object storage framework for Kotlin multiplatform projects.

ObjectStore A modular object storage framework for Kotlin multiplatform projects. Usage ObjectStore provides a simple key/value storage interface whic

Drew Carlson 4 Nov 10, 2022
A simple solution to handling persistent data storage in your Minecraft server.

Modern Data Stores A simple solution to handling persistent data storage in your Minecraft server. This plugin will be used throughout the Modern Plug

Modern Plugins 2 Nov 7, 2022
A simple solution to handling persistent data storage in your Minecraft server.

Modern Data Stores A simple solution to handling persistent data storage in your Minecraft server. This plugin will be used throughout the Modern Plug

Modern Plugins 2 Nov 7, 2022
Android app using Kotlin to manage to-do notes with firebase as backend service

TO-DO Manager TO-DO Manager is a simple note management app. Unlike other apps, TO-DO Manager is free and open source. You can access your nots from a

Ahmed Badr 3 Dec 10, 2022
Astha Nayak 4 Oct 10, 2022
An Android Library that provides social login for 15 platforms within by RxJava2, Kotlin and Firebase Authentication.

RxSocialLogin The license information for logo is located at the bottom of the document. These instructions are available in their respective language

WindSekirun (wind.seo) 124 Nov 21, 2022
Crunch-Mobile - A Food Delivery Mobile App which uses Modern App Architecture Pattern, Firebase And a Simple Restful Api

Crunch-Mobile This is a Food Delivery Mobile App which uses Modern App Architect

Bright Ugwu 1 Jan 1, 2022
E-Commerce application with MVVM & Clean Arch - Hilt - Coroutines - Retrofit - Firebase - Room DB.

E-Commerce-App E-Commerce application with MVVM & Clean Arch - Hilt - Coroutines - Retrofit - Firebase - Room DB. API Link Project Features MVVM with

Caner Türe 37 Nov 30, 2022
Bego Chat is chat application in Kotlin and Firebase with the following features: last seen , user status like typing ,online and last seen with MVVM pattern and clean architecture

Compose ChatApp(Bego Chat) Bego Chat is Compose chat application in Kotlin and Firebase with the following features: sending all file types and abilit

Ahmed EL Bagory 5 Dec 20, 2022
Fetch random dog images

RandomDogImages Show Random Dog Images Demo application built in 100% Kotlin and implementing some Jetpack Components. This app was developed for as a

ValentineRutto 5 Dec 7, 2022