3. Gửi dữ liệu
Sử dụng SetAsync: để gửi dữ liệu lên FireStore Database
Code mẫu:
Tạo class: FireStoreData
Code:
Trong đó:
collectionName: là tên collection để lưu trữ các dữ liệu cùng 1 cấu trúc
documentId: là các bản ghi lưu trữ dữ liệu (Thường là các userId của firebaseAuth) Xem code lấy firebaseUser
data: là dữ liệu được lưu tương ứng với mỗi documentId
Code mẫu lấy firebaseUser
Kết quả:
Last updated