Reputation: 190
I have read this question it was asked for swift but I have an exact same question for android, which is how to cancel setValue() process when I want programmaticaly ? To make the question more clear if I have a timer for the process when timer completes I want it to cancel any setValue() process .
Upvotes: 0
Views: 656
Reputation: 37404
You can use the same for android as well
The Firebase Database client automatically queues writes and sends them to the server at the earliest opportunity, depending on network connectivity.
In some cases (e.g. offline usage) there may be a large
number of writes waiting to be sent. Calling this method will purge
all outstanding writes so they are abandoned.
All writes will be purged, including transactions and onDisconnect()
writes. The writes will be rolled back locally
, perhaps triggering events for affected event listeners, and the client will not (re-)send them to the Firebase backend.
Upvotes: 5