public String getFormattedContactNumber() { return TextUtils.isEmpty(formattedContactNumber) ? getContactNumber() : formattedContactNumber; }
public void processContactNumbers(Context context) { TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String countryCode = telephonyManager.getSimCountryIso().toUpperCase(); if (TextUtils.isEmpty(formattedContactNumber)) { try { if (context.getApplicationContext() instanceof ALContactProcessor) { setFormattedContactNumber(((ALContactProcessor) context.getApplicationContext()).processContact(getContactNumber(), countryCode)); } }catch(ClassCastException e){ e.printStackTrace(); } } }
public ProfilePictureUpload(Contact contact, Context context, TextView displayNameTextView, TextView statusTextView, TextView contactNumberTextView) { this.context = context; this.status = contact.getStatus(); this.displayName = contact.getFullName(); this.contactNumber = contact.getContactNumber(); this.weakReferenceStatus = new WeakReference<TextView>(statusTextView); this.weakReferenceDisplayName = new WeakReference<TextView>(displayNameTextView); this.weakReferenceContactNumber = new WeakReference<TextView>(contactNumberTextView); this.fileClientService = new FileClientService(getActivity()); this.userService = UserService.getInstance(context); }
List<String> items = Arrays.asList(messageListItem.getTo().split("\\s*,\\s*")); Contact contact1 = ContactUtils.getContact(getContext(), items.get(0)); String contactinfo = TextUtils.isEmpty(contact1.getFirstName()) ? contact1.getContactNumber() : contact1.getFirstName(); if (items.size() > 1) { Contact contact2 = baseContactService.getContactById(items.get(1)); contactinfo = contactinfo + " , " + (TextUtils.isEmpty(contact2.getFirstName()) ? contact2.getContactNumber() : contact2.getFirstName());
public void refreshContactData() { if (contact != null) { Contact updateContact = baseContactService.getContactById(contact.getContactIds()); if (updateContact != null && (!TextUtils.isEmpty(contact.getImageURL())) && (!contact.getImageURL().equals(updateContact.getImageURL()))) { contactImageLoader.loadImage(updateContact, contactImage); } if (!TextUtils.isEmpty(updateContact.getStatus())) { status_cardView.setVisibility(View.VISIBLE); status.setText(updateContact.getStatus()); } if (!TextUtils.isEmpty(updateContact.getContactNumber())) { phone_cardView.setVisibility(View.VISIBLE); phone.setText(updateContact.getContactNumber()); } if (updateContact != null && (!TextUtils.isEmpty(contact.getDisplayName())) && (!contact.getDisplayName().equals(updateContact.getDisplayName()))) { name_cardView.setVisibility(View.VISIBLE); name.setText(updateContact.getDisplayName()); reload(); } } }
if (!TextUtils.isEmpty(contact.getContactNumber()) || isDeviceContactSync) { holder.contactNumberTextView.setVisibility(View.VISIBLE); holder.contactNumberTextView.setText(contact.getFormattedContactNumber()); } else { holder.contactNumberTextView.setText(contact.getContactNumber());
startActivity(callIntent); } else if (alCustomizationSettings.isShowActionDialWithOutCalling()) { if (!TextUtils.isEmpty(contact.getContactNumber())) { Intent callIntent; String uri = "tel:" + contact.getContactNumber().trim(); callIntent = new Intent(Intent.ACTION_DIAL); callIntent.setData(Uri.parse(uri)); applozicPermission.requestCallPermission(); } else if (PermissionsUtils.isCallPermissionGranted(this)) { if (!TextUtils.isEmpty(contact.getContactNumber())) { Intent callIntent; String uri = "tel:" + contact.getContactNumber().trim(); callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse(uri));
status.setText(contact.getStatus()); if (!TextUtils.isEmpty(contact.getContactNumber())) { phone_cardView.setVisibility(View.VISIBLE); phone.setText(contact.getContactNumber()); } else { phone_cardView.setVisibility(View.GONE);
if (!TextUtils.isEmpty(contact.getContactNumber())) { holder.contactNumberTextView.setText(contact.getContactNumber()); } else { holder.contactNumberTextView.setText("");
String contactNumber = contact != null ? contact.getContactNumber() : null; ApplozicClient setting = ApplozicClient.getInstance(getActivity());
statusText.setText(userContact.getStatus()); if (!TextUtils.isEmpty(userContact.getContactNumber())) { contactNumberText.setText(userContact.getContactNumber()); }else { applozicProfileContactLayout.setVisibility(View.GONE);
if (!TextUtils.isEmpty(contact.getContactNumber())) { contentValues.put(MobiComDatabaseHelper.CONTACT_NO, contact.getContactNumber());
if (items != null && items.size() > 1) { Contact contact2 = contactService.getContactById(items.get(1)); contactInfo = TextUtils.isEmpty(contactReceiver.getFirstName()) ? contactReceiver.getContactNumber() : contactReceiver.getFirstName() + ", " + (TextUtils.isEmpty(contact2.getFirstName()) ? contact2.getContactNumber() : contact2.getFirstName()) + (items.size() > 2 ? " & others" : "");
public void createEmptyMessage(Contact contact) { Message sms = new Message(); MobiComUserPreference userPreferences = MobiComUserPreference.getInstance(context); sms.setContactIds(contact.getFormattedContactNumber()); sms.setTo(contact.getContactNumber()); sms.setCreatedAtTime(0L); sms.setStoreOnDevice(Boolean.TRUE); sms.setSendToDevice(Boolean.FALSE); sms.setType(Message.MessageType.MT_OUTBOX.getValue()); sms.setDeviceKeyString(userPreferences.getDeviceKeyString()); sms.setSource(Message.Source.MT_MOBILE_APP.getValue()); messageDatabaseService.createMessage(sms); }