Public functions | |
---|---|
api_key() const | const char * Get the API key. |
app_id() const | const char * Retrieves the app ID. |
database_url() const | const char * Get database root URL, e.g. |
messaging_sender_id() const | const char * Get the Firebase Cloud Messaging sender ID. |
project_id() const | const char * Get the Google Cloud project ID. |
set_api_key(const char *key) | void API key used to authenticate requests from your app. |
set_app_id(const char *id) | void Set the Firebase app ID used to uniquely identify an instance of an app. |
set_database_url(const char *url) | void Set the database root URL, e.g. "http://abc-xyz-123.firebaseio.com". |
set_messaging_sender_id(const char *sender_id) | void Set the Firebase Cloud Messaging sender ID. |
set_project_id(const char *project) | void Set the Google Cloud project ID. |
set_storage_bucket(const char *bucket) | void Set the Google Cloud Storage bucket name, e.g. |
storage_bucket() const | const char * Get the Google Cloud Storage bucket name,. |
Public static functions | |
---|---|
LoadFromJsonConfig(const char *config, AppOptions *options) | Load options from a config string. |
AppOptions()
Create AppOptions.
To create a firebase::App object, the Firebase application identifier and API key should be set using set_app_id() and set_api_key() respectively.
See also:firebase::App::Create().
constchar*database_url()const
Get database root URL, e.g.
constchar*messaging_sender_id()const
Get the Firebase Cloud Messaging sender ID.
See also:set_messaging_sender_id().
constchar*project_id()const
Get the Google Cloud project ID.
This is the project_id in the Android google-services.json config file or PROJECT_ID in the GoogleService-Info.plist.
voidset_api_key(constchar*key)
API key used to authenticate requests from your app.
For example, "AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk" used to identify your app to Google servers.
This only needs to be specified if your application does not include google-services.json or GoogleService-Info.plist in its resources.
voidset_app_id(constchar*id)
Set the Firebase app ID used to uniquely identify an instance of an app.
This is the mobilesdk_app_id in the Android google-services.json config file or GOOGLE_APP_ID in the GoogleService-Info.plist.
This only needs to be specified if your application does not include google-services.json or GoogleService-Info.plist in its resources.
voidset_database_url(constchar*url)
Set the database root URL, e.g. "http://abc-xyz-123.firebaseio.com".
voidset_messaging_sender_id(constchar*sender_id)
Set the Firebase Cloud Messaging sender ID.
For example "012345678901", used to configure Firebase Cloud Messaging.
This only needs to be specified if your application does not include google-services.json or GoogleService-Info.plist in its resources.
voidset_project_id(constchar*project)
Set the Google Cloud project ID.
voidset_storage_bucket(constchar*bucket)
Set the Google Cloud Storage bucket name, e.g.
\"abc-xyz-123.storage.firebase.com\".
constchar*storage_bucket()const
Get the Google Cloud Storage bucket name,.
See also:set_storage_bucket().
AppOptions*LoadFromJsonConfig(constchar*config,AppOptions*options)
Load options from a config string.
Details | |||||
---|---|---|---|---|---|
Parameters |
| ||||
Returns | An instance containing the loaded options if successful. If the options argument to this function is null, this method returns an AppOptions instance allocated from the heap. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.