Невозможно добавить пользовательский объект на узел Firebase Android
Просто добавив мой пользовательский объект, он заканчивает работу, не выдает никаких ошибок или указаний, ниже приведен мой код, пожалуйста, помогите
@Override
public void onClick(View v) {
int id = v.getId();
switch (id) {
case R.id.create_profile_button:
prepareData();
if (CheckFields()) {
mProgressDialog.show();
mProgressDialog.setCancelable(Boolean.FALSE);
mProgressDialog.setMessage("Creating Profile");
Toast.makeText(this, "All set to rock", Toast.LENGTH_LONG).show();
throwData(createObject());
}
break;
}
}
private School createObject() {
School profile = new School();
profile.setSchoolName(name);
profile.setSchoolRegNo(regNo);
profile.setSchoolBoard(board);
profile.setSchoolCity(city);
profile.setSchoolPincode(pincode);
profile.setSchoolAddress(address);
profile.setSchoolState(state);
profile.setSchoolContact(contact);
profile.setSchoolEmail(email);
return profile;
}
private void throwData(School profile) {
mDatabase.child(regNo).setValue(profile).addOnCompleteListener(CreateProfileActivity.this).addOnFailureListener(CreateProfileActivity.this);
}
Школьный класс:
public class School {
public School() {
}
public String SchoolRegNo,SchoolName, SchoolBoard,
SchoolCity, SchoolPincode,
SchoolAddress, SchoolState,
SchoolContact, SchoolEmail;
public String getSchoolRegNo() {
return SchoolRegNo;
}
public void setSchoolRegNo(String schoolRegNo) {
SchoolRegNo = schoolRegNo;
}
public String getSchoolName() {
return SchoolName;
}
public void setSchoolName(String schoolName) {
SchoolName = schoolName;
}
public String getSchoolBoard() {
return SchoolBoard;
}
public void setSchoolBoard(String schoolBoard) {
SchoolBoard = schoolBoard;
}
public String getSchoolCity() {
return SchoolCity;
}
public void setSchoolCity(String schoolCity) {
SchoolCity = schoolCity;
}
public String getSchoolPincode() {
return SchoolPincode;
}
public void setSchoolPincode(String schoolPincode) {
SchoolPincode = schoolPincode;
}
public String getSchoolAddress() {
return SchoolAddress;
}
public void setSchoolAddress(String schoolAddress) {
SchoolAddress = schoolAddress;
}
public String getSchoolState() {
return SchoolState;
}
public void setSchoolState(String schoolState) {
SchoolState = schoolState;
}
public String getSchoolContact() {
return SchoolContact;
}
public void setSchoolContact(String schoolContact) {
SchoolContact = schoolContact;
}
public String getSchoolEmail() {
return SchoolEmail;
}
public void setSchoolEmail(String schoolEmail) {
SchoolEmail = schoolEmail;
}
}