FirebaseOptions

public final class FirebaseOptions


Configurable Firebase options.

Summary

Nested types

public final class FirebaseOptions.Builder

Builder for constructing FirebaseOptions.

Public methods

boolean
static @Nullable FirebaseOptions

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

@NonNull String

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

@NonNull String

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

@Nullable String

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

@Nullable String

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

@Nullable String

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

@Nullable String

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 @Nullable FirebaseOptions fromResource(@NonNull Context context)

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

Returns
@Nullable FirebaseOptions

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

getApiKey

public @NonNull String getApiKey()

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

getApplicationId

public @NonNull String getApplicationId()

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

getDatabaseUrl

public @Nullable String getDatabaseUrl()

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

getGcmSenderId

public @Nullable String getGcmSenderId()

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

getProjectId

public @Nullable String getProjectId()

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

getStorageBucket

public @Nullable String getStorageBucket()

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

hashCode

public int hashCode()

toString

public String toString()