I\'m trying to retrieve the updated User from the dataSnapshot of the Firebase Database:
mRef.addValueEventListener(new ValueEventListener() {
@Over
Create a constructor with no arguments as
public User() { } as cricket mentioned and to serialize
public class User implements Serializable {
private String firstName;
private String lastName;
private String profileId;
public User() {
}
public User(String fName, String lName, String id) {
this.firstName = fName;
this.lastName = lName;
this.profileId = id;
}
public String getProfileId() {
return profileId;
}
public void setProfileId(String id) {
this.profileId = id;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lName) {
this.lastName = lName;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String fName) {
this.firstName = fName;
}
}
If this didn't meet requirement note down