com.google.firebase.storage.ktx

Classes

TaskState

This class is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

TaskState.InProgress

This class is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

TaskState.Paused

This class is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

Top-level functions summary

StorageMetadata

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

Extension functions summary

operator Long

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator List<StorageReference>

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator Long

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator Long

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator Long

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator List<StorageReference>

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator Long

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator Long

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator String?

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator InputStream

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator StorageMetadata?

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator Uri?

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

FirebaseStorage

Accessing this object for Kotlin apps has changed; see the migration guide.

FirebaseStorage

Accessing this object for Kotlin apps has changed; see the migration guide.

FirebaseStorage

Accessing this object for Kotlin apps has changed; see the migration guide.

Extension properties summary

FirebaseStorage

Accessing this object for Kotlin apps has changed; see the migration guide.

Flow<TaskState<T>>

This property is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

Top-level functions

storageMetadata

fun storageMetadata(init: StorageMetadata.Builder.() -> Unit): StorageMetadata

Returns a StorageMetadata object initialized using the init function.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Extension functions

component1

operator fun FileDownloadTask.TaskSnapshot.component1(): Long

Destructuring declaration for FileDownloadTask.TaskSnapshot to provide bytesTransferred.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
Long

the bytesTransferred of the FileDownloadTask.TaskSnapshot

component1

operator fun ListResult.component1(): List<StorageReference>

Destructuring declaration for ListResult to provide its items.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
List<StorageReference>

the items of the ListResult

component1

operator fun StreamDownloadTask.TaskSnapshot.component1(): Long

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide bytesTransferred.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
Long

the bytesTransferred of the StreamDownloadTask.TaskSnapshot

component1

operator fun UploadTask.TaskSnapshot.component1(): Long

Destructuring declaration for UploadTask.TaskSnapshot to provide bytesTransferred.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
Long

the bytesTransferred of the UploadTask.TaskSnapshot

component2

operator fun FileDownloadTask.TaskSnapshot.component2(): Long

Destructuring declaration for FileDownloadTask.TaskSnapshot to provide totalByteCount.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
Long

the totalByteCount of the FileDownloadTask.TaskSnapshot

component2

operator fun ListResult.component2(): List<StorageReference>

Destructuring declaration for ListResult to provide its prefixes.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
List<StorageReference>

the prefixes of the ListResult

component2

operator fun StreamDownloadTask.TaskSnapshot.component2(): Long

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide totalByteCount.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
Long

the totalByteCount of the StreamDownloadTask.TaskSnapshot

component2

operator fun UploadTask.TaskSnapshot.component2(): Long

Destructuring declaration for UploadTask.TaskSnapshot to provide totalByteCount.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
Long

the totalByteCount of the UploadTask.TaskSnapshot

component3

operator fun ListResult.component3(): String?

Destructuring declaration for ListResult to provide its pageToken.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
String?

the pageToken of the ListResult

component3

operator fun StreamDownloadTask.TaskSnapshot.component3(): InputStream

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide its stream.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
InputStream

the stream of the StreamDownloadTask.TaskSnapshot

component3

operator fun UploadTask.TaskSnapshot.component3(): StorageMetadata?

Destructuring declaration for UploadTask.TaskSnapshot to provide its metadata.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
StorageMetadata?

the metadata of the UploadTask.TaskSnapshot

component4

operator fun UploadTask.TaskSnapshot.component4(): Uri?

Destructuring declaration for UploadTask.TaskSnapshot to provide its uploadSessionUri.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Returns
Uri?

the uploadSessionUri of the UploadTask.TaskSnapshot

storage

fun Firebase.storage(app: FirebaseApp, url: String): FirebaseStorage

Accessing this object for Kotlin apps has changed; see the migration guide.

Returns the FirebaseStorage instance of a given FirebaseApp and storage bucket url.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

storage

fun Firebase.storage(app: FirebaseApp): FirebaseStorage

Accessing this object for Kotlin apps has changed; see the migration guide.

Returns the FirebaseStorage instance of a given FirebaseApp.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

storage

fun Firebase.storage(url: String): FirebaseStorage

Accessing this object for Kotlin apps has changed; see the migration guide.

Returns the FirebaseStorage instance for a custom storage bucket at url.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Extension properties

storage

val Firebase.storageFirebaseStorage

Accessing this object for Kotlin apps has changed; see the migration guide.

Returns the FirebaseStorage instance of the default FirebaseApp.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

taskState

val StorageTask<T>.taskStateFlow<TaskState<T>>

Starts listening to this task's progress and emits its values via a Flow.

Important In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.