1. Are you ready for the Galaxy S20? Here is everything we know so far!

How do i get string list of username and fullname from firebase?

Discussion in 'Android Development' started by Vora Ravi, Apr 22, 2019.

  1. Vora Ravi

    Vora Ravi Lurker
    Thread Starter

    In java class i used some random username and fullname for testing but now i want to get the list of username and full name of user who are child of current user in Mates node in firebase.

    Code (Text):
    1.  
    2. public class User
    3. {
    4.  
    5.    public String fullname;
    6.    public String username;
    7.  
    8.  
    9.  
    10.    public User() {
    11.    }
    12.  
    13.    public User(String fullname, String username) {
    14.        this.fullname = fullname;
    15.        this.username = username;
    16.    }
    17.  
    18.  
    19.  
    20.    public String getFullname() {
    21.        return fullname;
    22.    }
    23.  
    24.    public String getUsername() {
    25.        return username;
    26.    }
    27.  
    28.  
    29.    public static List<User> USERS = Arrays.asList(
    30.  
    31.            new User("Priya Jain", "priya_98"),
    32.            new User("Manoj Patel","manoj_34"),
    33.            new User("Akbari Mayur", "mayur897"),
    34.            new User("Tushar Khabri", "khbri90")
    35.    );
    36.  
    37.  
    38. }
    39.  

    I want replace this user to firebase user who is child of current user, here i put link of database image.

    https://i.stack.imgur.com/CxOux.jpg
     


    #1 Vora Ravi, Apr 22, 2019
    Last edited by a moderator: Apr 22, 2019
Loading...
Similar Threads - string list username
  1. Stokestack
    Replies:
    6
    Views:
    643
  2. Cinemato
    Replies:
    0
    Views:
    408
  3. Guitarist
    Replies:
    0
    Views:
    668
  4. ElChief
    Replies:
    1
    Views:
    237
  5. Prashant Sontale
    Replies:
    0
    Views:
    229
  6. EAkio
    Replies:
    5
    Views:
    722
  7. Federico Desia
    Replies:
    8
    Views:
    525
  8. Federico Desia
    Replies:
    3
    Views:
    787
  9. MoodyBlues
    Replies:
    28
    Views:
    1,565
  10. Emre Can AYDIN
    Replies:
    4
    Views:
    984

Share This Page

Loading...