I have two Activities, I am adding data to Firestore from these two activities individually. But, whenever I add second activity data to Firestore, it is overwriting the fir
If you know that the user document allready exists in firestore then you should use
firebaseFirestore.collection("Users").document(user_id).update(data)
If you don't know if the document exists then you can use
firebaseFirestore.collection("Users").document(user_id).set(data, {merge:true})
This performs a deep merge of the data
Alternatively you can do it by using subcollections