I want to retrieve and show all users from firebase authentication
I tried the code from this link https://firebase.google.com/docs/auth/admin/manage-users
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_users_information);
//Get Firebase auth instance
FirebaseAuth auth = FirebaseAuth.getInstance();
// Start listing users from the beginning, 1000 at a time.
ListUsersPage page = FirebaseAuth.getInstance().listUsers(null);
while (page != null) {
for (ExportedUserRecord user : page.getValues()) {
System.out.println("User: " + user.getUid());
}
page = page.getNextPage();
}
page = FirebaseAuth.getInstance().listUsers(null);
for (ExportedUserRecord user : page.iterateAll()) {
System.out.println("User: " + user.getUid());
}
}
It gives me error at listUsers... it is not identified as keyword. Also what will be the layout for this, should I use list view??