| java.lang.Object | |
| ↳ | com.google.firebase.FirebaseApp |
The entry point of Firebase SDKs. It holds common configuration and state for Firebase APIs. Most applications don't need to directly interact with FirebaseApp.
Firebase APIs use the default FirebaseApp by default, unless a different one is explicitly passed to the API via FirebaseFoo.getInstance(firebaseApp).
initializeApp(FirebaseOptions) initializes the default app instance. This
method should be invoked at startup.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | DEFAULT_APP_NAME | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
delete()
Deletes the
FirebaseApp and all its data. | ||||||||||
| boolean | equals(Object o) | ||||||||||
| static List<FirebaseApp> |
getApps()
Returns a list of all FirebaseApps.
| ||||||||||
| static FirebaseApp |
getInstance(String name)
Returns the instance identified by the unique name, or throws if it does not exist.
| ||||||||||
| static FirebaseApp |
getInstance()
Returns the default (first initialized) instance of the
FirebaseApp. | ||||||||||
| String |
getName()
Returns the unique name of this app.
| ||||||||||
| FirebaseOptions |
getOptions()
Returns the specified
FirebaseOptions. | ||||||||||
| int | hashCode() | ||||||||||
| static FirebaseApp |
initializeApp(FirebaseOptions options, String name)
A factory method to intialize a
FirebaseApp. | ||||||||||
| static FirebaseApp |
initializeApp(FirebaseOptions options)
Initializes the default
FirebaseApp instance. | ||||||||||
| String | toString() | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Deletes the FirebaseApp and all its data. All calls to this FirebaseApp
instance will throw once it has been called.
A no-op if delete was called before.
Returns the instance identified by the unique name, or throws if it does not exist.
| name | represents the name of the FirebaseApp instance. |
|---|
FirebaseApp corresponding to the name.| IllegalStateException | if the FirebaseApp was not initialized, either via initializeApp(FirebaseOptions, String) or getApps().
|
|---|
Returns the default (first initialized) instance of the FirebaseApp.
| IllegalStateException | if the default app was not initialized. |
|---|
Returns the unique name of this app.
A factory method to intialize a FirebaseApp.
| options | represents the global FirebaseOptions |
|---|---|
| name | unique name for the app. It is an error to initialize an app with an already existing name. Starting and ending whitespace characters in the name are ignored (trimmed). |
FirebaseApp| IllegalStateException | if an app with the same name has already been initialized. |
|---|
Initializes the default FirebaseApp instance. Same as initializeApp(FirebaseOptions, String), but it uses DEFAULT_APP_NAME as name. *
The creation of the default instance is automatically triggered at app startup time, if Firebase configuration values are available from resources - populated from google-services.json.