June 2018
Beginner to intermediate
394 pages
9h 2m
English
Create a model class with constructors and declare a string to fetch the database reference for a unique key to add the list of objects. The model class is as follows:
public class Users { private String Name; private String Email; private String Phone; public Users() { } public String getName() { return Name; } public void setName(String name) { Name = name; } public String getEmail() { return Email; } public void setEmail(String email) { Email = email; } public String getPhone() { return Phone; } public void setPhone(String phone) { Phone = phone; } public Users(String name, String email, String phone) { Name = name; Email = email; Phone = phone; }}
Now in the activity class using the DatabaseReference ...
Read now
Unlock full access