Interface SnapshotListener
public interface SnapshotListener
Receives live updates from
Firestore.addSnapshotListener(Query, SnapshotListener).-
Method Summary
Modifier and TypeMethodDescriptionvoidCalled on the EDT when a request fails.voidonSnapshot(QuerySnapshot snapshot) Called on the EDT with the current state.
-
Method Details
-
onSnapshot
Called on the EDT with the current state. A document listener sees a list of one document, whose
DocumentSnapshot.exists()is false when the document is missing.Parameters
snapshot: the state and its changes
-
onError
Called on the EDT when a request fails. The listener keeps running and retries.
Parameters
error: the failure
-