0
出了什麼問題?存儲在firebase數據庫中的數據都是錯誤的,這與我在EditTexts中的輸入完全不同。爲什麼在firebase中存儲了錯誤的數據android
public void createToUserProfile(){
String firstName = etFirstName.toString().trim();
String lastName = etLastName.toString().trim();
String mobilePhoneNumber = etMobilePhoneNumber.toString().trim();
String iDNumber = etIDNumber.toString().trim();
String year = etYear.toString().trim();
String month = etMonth.toString().trim();
String day = etDay.toString().trim();
String dateOfBirth = year+"/"+month+"/"+day;
String country = etCountry.toString().trim();
String province = etProvince.toString().trim();
String city = etCity.toString().trim();
String postCode = etPostCode.toString().trim();
String address = etAddress.toString().trim();
Firebase ref = new Firebase(Config.USER_URL);
UserP newUser = new UserP();
newUser.setFirstName(firstName);
newUser.setLastName(lastName);
newUser.setMobilePhoneNumber(mobilePhoneNumber);
newUser.setiDNumber(iDNumber);
newUser.setDateOfBirth(dateOfBirth);
newUser.setCountry(country);
newUser.setProvince(province);
newUser.setCity(city);
newUser.setPostCode(postCode);
newUser.setAddress(address);
ref.child("UserP").setValue(newUser);
}
的火力地堡控制檯存儲的數據顯示如下: Data stored wrong in Firebase Database
非常感謝!問題解決了。 –