Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface SnapshotListener
Receives live updates from
Firestore.addSnapshotListener(Query, SnapshotListener).Methods
public abstract void onSnapshot(QuerySnapshot snapshot) | Called on the EDT with the current state. |
public abstract void onError(Throwable error) | Called on the EDT when a request fails. |
Method details
onSnapshot
public abstract void onSnapshot(QuerySnapshot snapshot)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
snapshotQuerySnapshot- the state and its changes
onError
public abstract void onError(Throwable error)Called on the EDT when a request fails. The listener keeps running and
retries.
Parameters
errorThrowable- the failure