I am trying to add a timestamp field in an Android client with Firebase Firestore.
According to the documentation:
Annotation used to mark a D
use FieldValue.serverTimestamp() get server timestamp
Map msg = new HashMap<>(); msg.put("timestamp", FieldValue.serverTimestamp());