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

publicUrigetProfileUri() {
    returnUri.parse(profileUri);
  }

  publicvoidsetProfileUri(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

publicStringgetProfileUri() {
    return profileUri;
  }
  publicvoidsetProfileUri(String profileUri) {
    this.profileUri = profileUri;
  }

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