use of com.fanap.podchat.requestobject.RequestAddContact in project pod-chat-android-sdk by FanapSoft.
the class IntegrationTest method addContact.
@Test
public void addContact() {
chatListeners = new ChatListener() {
@Override
public void onContactAdded(String content, ChatResponse<ResultAddContact> response) {
System.out.println("Contact Removed: " + content);
contactContent = content;
resumeProcess();
}
};
chat.addListener(chatListeners);
RequestAddContact request = new RequestAddContact.Builder().firstName("Nadia").lastName("Anvari").username("nadia.anvari").email("nadia.anvari@fanap.ir").build();
chat.addContact(request);
pauseProcess();
System.out.println("Received contact: " + contactContent);
}
use of com.fanap.podchat.requestobject.RequestAddContact in project pod-chat-android-sdk by FanapSoft.
the class ChatActivity method addContact.
private void addContact() {
// {"id":344016830,"senderName":"chat-server","senderId":0,"type":4,"content":"{\"type\":23,\"messageType\":0,\"subjectId\":0,\"uniqueId\":\"fe08a72b-09eb-45b2-b6b2-03cd4dab4855\",\"content\":\"{\\\"id\\\":15424,\\\"coreUserId\\\":31257,\\\"sendEnable\\\":true,\\\"receiveEnable\\\":true,\\\"name\\\":\\\"رضا شریفی\\\",\\\"cellphoneNumber\\\":\\\"09365090061\\\",\\\"email\\\":\\\"rezasharify1993.rsmi@gmail.com\\\",\\\"username\\\":\\\"user-15778858615492\\\",\\\"contactSynced\\\":true}\",\"time\":1606317640273}"}
// add contact
// presenter.addContact("",
// "",
// "",
// faker.name().username() + "@gmail.com",
// "");
//
// presenter.addContact("",
// "",
// "",
// "",
// "");
// 16844 zabix1
List<String> usernames = new ArrayList<>();
// usernames.add("z.mohammadi");
// usernames.add("p.khoshghadam");
// usernames.add("m.hasanpour");
// usernames.add("z.ershad");
// usernames.add("Samira.amiri");
// usernames.add("s.heydarizadeh");
// usernames.add("p.pahlavani");
usernames.add("ma.amjadi");
// for (String user :
// usernames) {
//
//
// try {
// RequestAddContact request = new RequestAddContact.Builder()
// .firstName(user + " n ")
// .lastName(user + " i ")
// .username(user)
// .build();
//
// presenter.addContact(request);
//
// Thread.sleep(7000);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
//
//
// }
// RequestAddContact request = new RequestAddContact.Builder()
// .firstName("Leila")
// .lastName("Nemati")
// .cellphoneNumber("09126975376") //80617 //80618
// // .cellphoneNumber()
// // .email()
// .build();
//
// presenter.addContact(request);
RequestAddContact request = new RequestAddContact.Builder().firstName("Nadia").lastName("Anvari").username("nadia.anvari").email("nadia.anvari@fanap.ir").build();
presenter.addContact(request);
}
Aggregations