Firebase

object Firebase


All fields in this object are deprecated; Use com.google.firebase.Firebase instead.

Single access point to all firebase SDKs from Kotlin. Acts as a target for extension methods provided by sdks.

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.

Summary

Extension functions

FirebaseApp

Accessing this object for Kotlin apps has changed; see the migration guide: https://firebase.google.com/docs/android/kotlin-migration.

FirebaseApp?

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

FirebaseApp

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

FirebaseApp
Firebase.initialize(
    context: Context,
    options: FirebaseOptions,
    name: String
)

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

Extension properties

FirebaseApp

Accessing this object for Kotlin apps has changed; see the migration guide: https://firebase.google.com/docs/android/kotlin-migration.

FirebaseOptions

Accessing this object for Kotlin apps has changed; see the migration guide: https://firebase.google.com/docs/android/kotlin-migration.

Extension functions

app

fun Firebase.app(name: String): FirebaseApp

Accessing this object for Kotlin apps has changed; see the migration guide: https://firebase.google.com/docs/android/kotlin-migration.

Returns a named firebase app instance.

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.

initialize

fun Firebase.initialize(context: Context): FirebaseApp?

Initializes and returns a 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.

initialize

fun Firebase.initialize(context: Context, options: FirebaseOptions): FirebaseApp

Initializes and returns a 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.

initialize

fun Firebase.initialize(
    context: Context,
    options: FirebaseOptions,
    name: String
): FirebaseApp

Initializes and returns a 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.

Extension properties

app

val Firebase.appFirebaseApp

Accessing this object for Kotlin apps has changed; see the migration guide: https://firebase.google.com/docs/android/kotlin-migration.

Returns the default firebase app instance.

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.

options

val Firebase.optionsFirebaseOptions

Accessing this object for Kotlin apps has changed; see the migration guide: https://firebase.google.com/docs/android/kotlin-migration.

Returns options of 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.