public class FirebaseManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static FirebaseManager |
shared
The shared instance of the Firebase manager.
|
Modifier and Type | Method and Description |
---|---|
void |
authenticate(FirestoreCompletionHandler<java.lang.Void> handler)
Authenticates the user so that they are able to interact with Firebase.
|
void |
disableCache(FirestoreCompletionHandler<java.lang.Void> handler)
Disables the Firestore cache.
|
void |
enableCache(FirestoreCompletionHandler<java.lang.Void> handler)
Enables the Firestore cache.
|
<T extends FirestoreConstructable> |
getDocuments(FirestoreDatabaseCollection collection,
java.lang.String path,
FirestoreCompletionHandler<java.util.List<T>> handler)
Retrieves documents contained within a Firestore collection.
|
public static FirebaseManager shared
public <T extends FirestoreConstructable> void getDocuments(FirestoreDatabaseCollection collection, java.lang.String path, FirestoreCompletionHandler<java.util.List<T>> handler)
collection
- The collection of documents to retrieve.handler
- The completion handler called once the Firestore operation has finished.public void enableCache(FirestoreCompletionHandler<java.lang.Void> handler)
handler
- The completion handler called once the cache has been enabled.public void disableCache(FirestoreCompletionHandler<java.lang.Void> handler)
handler
- The completion handler called once the cache has been disabled.public void authenticate(FirestoreCompletionHandler<java.lang.Void> handler)
handler
- The completion handler called once the user has been authenticated.