我正在使用Firestore。我只想检查那个文件。但是该文档包含6个数据。我无需阅读即可查看该文档的可用性。
SF -名称=“ ...” -data =“ ...” -bio =“ .....” -photo =“ ...” -time =“ ...” -time2 =“ .....”
6个数据
DocumentReference docRef = db.collection("cities").document("SF");
docRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {
@Override
public void onComplete(@NonNull Task<DocumentSnapshot> task) {
if (task.isSuccessful()) {
DocumentSnapshot document = task.getResult();
if (document.exists()) {
//No 6 data
} else {
}
} else {
Log.d(TAG, "get failed with ", task.getException());
}
}
});