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 GCLOUD_PROJECT environment variable. 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 Firestore instance associated with the specified Firebase app.
static Firestore
getFirestore()
Returns the Firestore instance associated with the default Firebase app.

Inherited Method Summary

Public Methods

public static Firestore getFirestore (FirebaseApp app)

Returns the Firestore instance associated with the specified Firebase app.

Parameters
app A non-null FirebaseApp.
Returns

public static Firestore getFirestore ()

Returns the Firestore instance associated with the default Firebase app.

Returns

Send feedback about...

Need help? Visit our support page.