FirestoreClient

public class FirestoreClient extends Object

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 Method Summary

static Firestore
getFirestore(FirebaseApp app)
Returns the default Firestore instance associated with the specified Firebase app.
static Firestore
getFirestore()
Returns the default Firestore instance associated with the default Firebase app.

Inherited Method Summary

Public Methods

public static Firestore getFirestore (FirebaseApp app)

Returns the default Firestore instance associated with the specified Firebase app. For a given app, invocation always returns the same instance. The Firestore instance and all references obtained from it becomes unusable, once the specified app is deleted.

Parameters
app A non-null FirebaseApp.
Returns

public static Firestore getFirestore ()

Returns the default 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.

Returns