Context

open class Context(source)

Stands in for android.content.Context so that the Firebase Android SDK members taking or returning one (FirebaseApp.initializeApp, FirebaseApp.getApps, FirebaseApp.getApplicationContext, FirebaseOptions.fromResource and Firebase.initialize) keep their exact signatures in common code, which an Android app's common code passes its context through.

On Android and the JVM the class is a header stub that is stripped from the output (see buildSrc utils/HeaderStubs.kt), so code there uses the platform's own: Android's, or firebase-java-sdk's on the JVM. Apple platforms, JS and wasmJs have no context, so this placeholder is shipped there: platform code creates one with Context() to pass where the SDK takes a Context, and the SDK ignores it.

Constructors

Link copied to clipboard
constructor()