@Override public Contact getContactById(String contactId) { Contact contact = ContactUtils.getContact(context, contactId); if (contact != null) { contact.processContactNumbers(context); } return contact; }
public Contact(String fullName, List<String> emailIds, List<String> contactNumbers, long contactId) { this(contactId); processFullName(fullName); this.emailIds = emailIds; this.contactNumbers = contactNumbers; }
public Contact(Context context, String userId) { this.userId = userId; this.processContactNumbers(context); }
public Contact getSupportContact() { Contact contact = new Contact(); contact.setFirstName("Support"); contact.setLastName(""); contact.setFullName("Support"); contact.setContactNumber(getSupportNumber()); contact.setFormattedContactNumber(getSupportNumber()); return contact; } }
public boolean isOnline() { return !isBlocked() && !isBlockedBy() && isConnected(); }
public static String prepareMessageFromTemplate(String body, Contact contact) { body = body.replace(expressions[0], contact.getFullName()); body = body.replace(expressions[1], contact.getFullName()); body = body.replace(expressions[2], contact.getFirstName()); body = body.replace(expressions[3], contact.getMiddleName()); body = body.replace(expressions[4], contact.getLastName()); return body; }
public void saveOrUpdate(Contact contact) { Contact existingContact = getContactById(contact.getUserId()); if (existingContact == null) { addContact(contact); } else { if (Contact.ContactType.DEVICE_AND_APPLOZIC.getValue().equals(existingContact.getDeviceContactType())) { contact.setDeviceContactType(existingContact.getDeviceContactType()); } else if (Contact.ContactType.DEVICE_AND_APPLOZIC.getValue().equals(contact.getDeviceContactType())) { contact.setDeviceContactType(existingContact.getDeviceContactType()); } updateContact(contact); } }
public String getCurrentUserId() { if (contact == null) { return ""; } return contact.getUserId() != null ? contact.getUserId() : contact.getFormattedContactNumber(); }
public String getDisplayName() { if (formattedContactNumber != null) { return TextUtils.isEmpty(phoneDisplayName) ? TextUtils.isEmpty(getFormattedContactNumber()) ? getContactIds() : getFormattedContactNumber() : phoneDisplayName; } return TextUtils.isEmpty(fullName) ? getContactIds() : fullName; }
public void processUserStatus(Contact contact) { if (contact != null && contact.getContactIds() != null) { processUserStatus(contact.getUserId(), false); } }
public static Contact getContact(Context context, Long contactId) { String number = getContactNumberByContactId(context, String.valueOf(contactId)); return getContact(context, String.valueOf(contactId), number); }
public String getFormattedContactNumber() { return contact != null ? contact.getFormattedContactNumber() : null; }
public String getrDrawableName() { return getImageURL() == null ? getImageURL() : getImageURL().substring(R_DRAWABLE.length() + 1); }
public void setDeviceContactType(Short contactType) { if(contactType == null){ return; } this.deviceContactType = contactType; setApplozicType(ContactType.APPLOZIC.getValue().equals(this.deviceContactType) || ContactType.DEVICE_AND_APPLOZIC.getValue().equals(this.deviceContactType)); }
@Override public Contact getContactReceiver(List<String> items, List<String> userIds) { if (items != null && !items.isEmpty()) { return ContactUtils.getContact(context, items.get(0)); } return null; }
public void refreshContactData() { if (contact != null) { contact = contactService.getContactById(contact.getContactIds()); } }
@Override public void onClick(DialogInterface dialogInterface, int i) { blockUserProcess(withUserContact.getUserId(), block, isFromChannel); } });
public boolean hasMultiplePhoneNumbers() { return contact != null && contact.hasMultiplePhoneNumbers(); }
public boolean hasMultiplePhoneNumbers() { return getPhoneNumbers() != null && !getPhoneNumbers().isEmpty() && getPhoneNumbers().size() > 1; }
public void onClick(View v) { ContactUtils.startContactAddActivity(getActivity()); } });