I Cannot Retrieve Nested Child From Firebase Through Pojo Class Object
This is my database table: I am saving some user information in Firebase through POJO class during installation i.e. name, photo, phone number. Later on in app user can add truste
Solution 1:
You can get the trusted contact using this schema . you have to match between response class and POJO class ,because you code is waiting for uphoto,uphone,uname,address,contacename1 and contactnumber1 as viarables,but you have uphoto,uphone,uname,address as variables and an object that named TrustedContact1 that contains contacename1 and contactnumber1 , in you case you should use :
package com.example.fizatanveerkhan.citycops;
import java.util.HashMap;
public class UserInformation {
private String uphone;
private String uphoto ;
private String uname;
private String address;
private TrustedContact1 TrustedContact1;
// use inner class on create class in another file
class TrustedContact1{
public TrustedContact1(){
}
private String contactname1;
private String contactnumber1;
}
// getters and seeters
}
Post a Comment for "I Cannot Retrieve Nested Child From Firebase Through Pojo Class Object"