| java.lang.Object | |
| ↳ | com.google.firebase.cloud.FirestoreClient |
FirestoreClient provides access to Google Cloud Firestore. Use this API to obtain a
Firestore
instance, which provides methods for updating and querying data in Firestore.
A Google Cloud project ID is required to access Firestore. FirestoreClient determines the
project ID from the FirebaseOptions used to initialize the underlying
FirebaseApp. If that is not available, it examines the credentials used to initialize
the app. Finally it attempts to get the project ID by looking up the GOOGLE_CLOUD_PROJECT and
GCLOUD_PROJECT environment variables. If a project ID cannot be determined by any of these
methods, this API will throw a runtime exception.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static Firestore |
getFirestore(FirebaseApp app)
Returns the Firestore instance associated with the specified Firebase app.
| ||||||||||
| static Firestore |
getFirestore()
Returns the Firestore instance associated with the default Firebase app.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Returns the Firestore instance associated with the specified Firebase app. For a given app, always returns the same instance. The Firestore instance and all references obtained from it becomes unusable, once the specified app is deleted.
| app | A non-null FirebaseApp. |
|---|
Firestore
instance.
Returns the Firestore instance associated with the default Firebase app. Returns the same instance for all invocations. The Firestore instance and all references obtained from it becomes unusable, once the default app is deleted.
Firestore
instance.