FirebaseOptions
public final class FirebaseOptions
Configurable Firebase options.
Summary
Nested types |
|---|
public final class FirebaseOptions.BuilderBuilder for constructing FirebaseOptions. |
Public fields |
|
|---|---|
final String |
|
final String |
|
final String |
|
final String |
|
final String |
|
final String |
|
final String |
Public methods |
|
|---|---|
boolean |
|
static @Nullable FirebaseOptions |
fromResource(@NonNull Context context)Creates a new |
@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 |
hashCode() |
String |
toString() |
Public fields
Public methods
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.