I converted one of my apps to the new Firestore. I am doing things like saving a document on a button click, and then in the onSuccess listener, going to a diff
When there is a loss of network connectivity (there is no network connection on user device), neither onSuccess() nor onFailure() are triggered. This behavior makes sense, since the task is considered completed only when the data has been committed (or rejected) on the Firebase server. So onSuccess() will fire only when the task completes successfully.
There is no need to check for network availability before each save. There is workaround which easily can help you see if the Firestore client indeed can't connect to the Firebase server, which is by enabling debug logging:
FirebaseFirestore.setLoggingEnabled(true);
Operations that write data to the Firestore database are defined to signal completion once they've actually committed to the backend. As a result this is working as intended: while offline they won't signal completion.
Note that the Firestore clients internally guarantee that you can read your own writes even if you don't wait for completion of the task from delete. The Firestore client is designed to continue functioning fine without an internet connection. So writing/deleting to the database without an internet connection is (by design) possible.