I have this codebase where I set a value. In offline mode it writes successfully but is not calling the CompletionListener.onComplete callback function.
newO
The completion listener for write operations will be invoked when the write has been committed to the database on the Firebase servers. When you're offline, that won't happen.
There is no way to unsubscribe a completion listener. If the listener still exists when the write operation completes, it will be invoked.