FirebaseOptions

public final class FirebaseOptions


Configurable Firebase options.

Summary

Nested types

public final class FirebaseOptions.Builder

Builder for constructing FirebaseOptions.

Public methods

boolean
static @NullableFirebaseOptions

Creates a new FirebaseOptions instance that is populated from string resources.

@NonNullString

API key used for authenticating requests from your app, e.g.

@NonNullString

The Google App ID that is used to uniquely identify an instance of an app.

@NullableString

The database root URL, e.g. http://abc-xyz-123.firebaseio.com.

@NullableString

The Project Number from the Google Developer's console, for example 012345678901, used to configure Google Cloud Messaging.

@NullableString

The Google Cloud project ID, e.g. my-project-1234

@NullableString

The Google Cloud Storage bucket name, e.g. abc-xyz-123.storage.firebase.com.

int
String

Public fields

apiKey

public final String apiKey

applicationId

public final String applicationId

databaseUrl

public final String databaseUrl

gaTrackingId

public final String gaTrackingId

gcmSenderId

public final String gcmSenderId

projectId

public final String projectId

storageBucket

public final String storageBucket

Public methods

equals

public boolean equals(Object o)

fromResource

public static @NullableFirebaseOptions fromResource(@NonNullContext context)

Creates a new FirebaseOptions instance that is populated from string resources.

Returns
@NullableFirebaseOptions

The populated options or null if applicationId is missing from resources.

getApiKey

public @NonNullString getApiKey()

API key used for authenticating requests from your app, e.g. AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk, used to identify your app to Google servers.

getApplicationId

public @NonNullString getApplicationId()

The Google App ID that is used to uniquely identify an instance of an app.

getDatabaseUrl

public @NullableString getDatabaseUrl()

The database root URL, e.g. http://abc-xyz-123.firebaseio.com.

getGcmSenderId

public @NullableString getGcmSenderId()

The Project Number from the Google Developer's console, for example 012345678901, used to configure Google Cloud Messaging.

getProjectId

public @NullableString getProjectId()

The Google Cloud project ID, e.g. my-project-1234

getStorageBucket

public @NullableString getStorageBucket()

The Google Cloud Storage bucket name, e.g. abc-xyz-123.storage.firebase.com.

hashCode

public int hashCode()

toString

public String toString()