package com.quickblox.sample.videochatwebrtcnew.helper;

import android.util.Log;

import com.quickblox.sample.videochatwebrtcnew.User;

import java.util.ArrayList;
import java.util.List;

public class DataHolder {

    public static ArrayList<User> usersList;


    public void setUsersList(List<User> UsersList) {
        this.usersList = usersList;
    }

    public int getUserListSize() {
        return usersList.size();
    }

    public String getUserName(int index) {
        return usersList.get(index).getFullName();
    }

    public User getUser(int index) {
        return usersList.get(index);
    }

    public User getLastQBUser() {
        return usersList.get(usersList.size() - 1);
    }

    public void addUserToList(User user) {
        usersList.add(user);
    }

    public static ArrayList<User> createUsersList (){
        usersList = new ArrayList<>();

//        usersList.add(new User(1, "User 1", "user_1", "11111111", 2224038));
//        usersList.add(new User(2, "User 2", "user_2", "11111111", 2224046));
//        usersList.add(new User(3, "User 3", "user_3", "11111111", 2224047));
//        usersList.add(new User(4, "User 4", "user_4", "11111111", 2224050));
//        usersList.add(new User(5, "User 5", "user_5", "11111111", 2224052));
//        usersList.add(new User(6, "User 6", "user_6", "11111111", 2224054));
//        usersList.add(new User(7, "User 7", "user_7", "11111111", 2224057));
//        usersList.add(new User(8, "User 8", "@dev8", "x6Bt0VDy5", 2224058));
//        usersList.add(new User(9, "User 9", "user_9", "11111111", 2224060));
//        usersList.add(new User(10, "User 10", "user_10", "11111111", 2224062));


        usersList.add(new User(1, "User 1", "androidUser1", "x6Bt0VDy5", 2327456));
        usersList.add(new User(2, "User 2", "androidUser2", "x6Bt0VDy5",2344849));
        usersList.add(new User(3, "User 3", "androidUser3", "x6Bt0VDy5",2432525));
        usersList.add(new User(4, "User 4", "androidUser4", "x6Bt0VDy5",2432530));
        usersList.add(new User(5, "User 5", "androidUser5", "x6Bt0VDy5",2432533));
        usersList.add(new User(6, "User 6", "androidUser6", "x6Bt0VDy5",2432536));
        usersList.add(new User(7, "User 7", "androidUser7", "x6Bt0VDy5",2432541));
        usersList.add(new User(8, "User 8", "androidUser8", "x6Bt0VDy5",2432547));
        usersList.add(new User(9, "User 9", "androidUser9", "x6Bt0VDy5",2432550));
        usersList.add(new User(10, "User 10", "androidUser10", "x6Bt0VDy5",2432553));

        return usersList;
    }


    public static String getUserNameByID(Integer callerID) {
        Log.d("Track", "callerID " + callerID);
        for (User user : usersList){
            Log.d("Track", "getFullName " + user.getId());
            if (user.getId().equals(callerID)){
                return user.getFullName();
            }
        }
        return "User_name_unused";
    }
}
@@ -254,16 +254,71 @@
 rsList;%0A
+    public static final String PASSWORD = %22x6Bt0VDy5%22;%0A
 %0A%0A    pu
@@ -1721,24 +1721,25 @@
 224062));%0A%0A%0A
+%0A
         user
@@ -1775,43 +1775,40 @@
 %22, %22
-androidUser1%22, %22x6Bt0VDy5%22, 2327456
+webrtc_user1%22, PASSWORD, 2436251
 ));%0A
@@ -1856,42 +1856,39 @@
 %22, %22
-androidUser2%22, %22x6Bt0VDy5%22,2344849
+webrtc_user2%22, PASSWORD,2436254
 ));%0A
@@ -1936,42 +1936,39 @@
 %22, %22
-androidUser3%22, %22x6Bt0VDy5%22
+webrtc_user3%22, PASSWORD
 ,243
+6
 25
-25
+7
 ));%0A
@@ -2016,42 +2016,39 @@
 %22, %22
-androidUser4%22, %22x6Bt0VDy5%22
+webrtc_user4%22, PASSWORD
 ,243
+6
 25
-30
+8
 ));%0A
@@ -2096,42 +2096,39 @@
 %22, %22
-androidUser5%22, %22x6Bt0VDy5%22
+webrtc_user5%22, PASSWORD
 ,243
+6
 25
-33
+9
 ));%0A
@@ -2176,42 +2176,39 @@
 %22, %22
-androidUser6%22, %22x6Bt0VDy5%22,2432536
+webrtc_user6%22, PASSWORD,2436262
 ));%0A
@@ -2256,42 +2256,39 @@
 %22, %22
-androidUser7%22, %22x6Bt0VDy5%22,2432541
+webrtc_user7%22, PASSWORD,2436263
 ));%0A
@@ -2336,42 +2336,39 @@
 %22, %22
-androidUser8%22, %22x6Bt0VDy5%22,2432547
+webrtc_user8%22, PASSWORD,2436265
 ));%0A
@@ -2416,42 +2416,39 @@
 %22, %22
-androidUser9%22, %22x6Bt0VDy5%22,2432550
+webrtc_user9%22, PASSWORD,2436266
 ));%0A
@@ -2498,43 +2498,40 @@
 %22, %22
-androidUser10%22, %22x6Bt0VDy5%22,2432553
+webrtc_user10%22, PASSWORD,2436269
 ));%0A

Add multi platform users