safedispatch-mobile/libSafeMobile/src/main/java/com/safemobile/lib/LoginMSG.java
2022-03-14 11:53:00 +02:00

43 lines
968 B
Java

package com.safemobile.lib;
import java.util.ArrayList;
import com.safemobile.lib.User;
public class LoginMSG extends TCPmsg{
public ArrayList<User> userList;
public LoginMSG(TCPmsg m) {
super(m);
userList = new ArrayList<User>();
String date4parsing = super.data;
//SM.Debug("date4parsing:"+date4parsing);
String[] tempArr = date4parsing.split(";");
for(int i =0; i<tempArr.length;i++)
{
//SM.Debug("i:" + i+"Data :"+tempArr[i]);
String[] tempUser = tempArr[i].split("&");
//SM.Debug("split len:"+tempUser.length);
if(tempUser.length<3)
continue;
int ID = Integer.parseInt(tempUser[1]);
String logName = tempUser[0];
String pass = tempUser[2];
User usr= new User(ID, "", "", logName, pass, 0, 0);
userList.add(usr);
//SM.Debug("added user to list:" +logName);
//SM.Debug("LoginMSG new size:" +this.userList.size());
}
//SM.Debug("LoginMSG userList:" +this.userList.size());
}
}