Kotlin Firebase Storage – Download Files to Memory, Local File | Android
In previous post, we had known the way to upload data. This tutorial shows you how to download Files to Memory, Local File with Firebase Cloud Storage.
Related Posts:
getBytes()
for in-memory data, getFile()
for local file.
To know way to add Firebase Storage to Android App & enable Firebase Auth, please visit previous post:
Kotlin Firebase Storage – Upload Data from Memory, Local File, Stream | Android
This tutorial bases on the code from that post, and continues with download methods.
// From our app val storageRef = storage.getReference()
// With an initial file path and name
val pathReference = storageRef.child(“images/javasampleapproach.jpg”)// To a file from a Google Cloud Storage URI
val gsReference = storage.getReferenceFromUrl(“gs://javasampleapproach-storage.appspot.com/images/javasampleapproach.jpg”)
// From an HTTPS URL
val httpsReference = storage.getReferenceFromUrl(“https://firebasestorage.googleapis.com/v0/b/javasampleapproach-storage.appspot.com/o/images%2Fjavasampleapproach.jpg”)
More at:
Kotlin Firebase Storage – Download Files to Memory, Local File | Android
#kotlin #firebase #storage #android