帮助,我无法将数据保存在Firebase实时数据库中,这使我的应用程序无法使用。请在android上帮助即时通讯。
private void SReport(){
String name = etfulln.getText().toString().trim();
String reason = etreason.getText().toString().trim();
String address = etaddr.getText().toString().trim();
String contact = etcontn.getText().toString().trim();
if (!TextUtils.isEmpty(name) && !TextUtils.isEmpty(reason) && !TextUtils.isEmpty(address) && !TextUtils.isEmpty(contact)){
String id = DBReport.push().getKey();
Report report = new Report(id,name,reason,address,contact);
DBReport.child(id).setValue(report);
Toast.makeText(this, "Report added", Toast.LENGTH_LONG).show();
}
else{
Toast.makeText(this, "Fill details", Toast.LENGTH_LONG).show();
}
}