【发布时间】:2021-08-03 00:10:52
【问题描述】:
我正在尝试添加申请该工作的用户,我想将这些用户存储在同一字段中,但我的代码删除了以前的用户,所以我怎样才能在不删除以前的用户的情况下添加它 这是我的代码
String email=user.getEmail();
HashMap<String,Object> basvurubilgileri=new HashMap<>();
basvurubilgileri.put("İlana Başvuran Kişiler",email);
firestore.collection("İlanlar").document(ilanbaslıgı).update(basvurubilgileri).addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void unused) {
Toast.makeText(Basvurma.this, "Başvurunuz Başarılı Bir Şekilde Yapılmıştır", Toast.LENGTH_SHORT).show();
Intent intent=new Intent(Basvurma.this,Secimekrani.class);
startActivity(intent);
finish();
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(Basvurma.this, e.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
}
});
【问题讨论】:
标签: java android google-cloud-firestore