Skip to content Skip to sidebar Skip to footer

Unable To Save New Data In Firebase

I am trying to save new data in firebase under a node Visitors. i have already set some rules on that node. 'Visitor':{ '$userId':{ '.write': 'auth != null && $userId

Solution 1:

I got to know where the problem is in my pojo

public Uri getProfileUri() {
    return Uri.parse(profileUri);
  }

  public void setProfileUri(Uri profileUri) {
    this.profileUri = profileUri.toString();
  }

Realm is supporting getters of type Uri and setters with type Uri as parameter but firebase database does not.

so in my pojo, i changed to

public String getProfileUri() {
    return profileUri;
  }
  public void setProfileUri(String profileUri) {
    this.profileUri = profileUri;
  }

Post a Comment for "Unable To Save New Data In Firebase"