public class ContactUtils
extends java.lang.Object
| Constructor and Description |
|---|
ContactUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkIfPhoneNumberExists(java.util.List<java.lang.String> phoneNumbers,
java.lang.String numberToCheck)
Checks whether the numberToCheck is present in the supplied list
|
static java.lang.String |
cleanupPhoneNumber(java.lang.String formattedPhoneNumber)
Remove all extra symbols and spaces from a given phone number
|
static void |
openWhatsAppContact(android.content.Context context,
java.lang.String contactId)
Tries to open a WhatsApp Contact
|
static void |
sendWhatsAppMethod(android.content.Context context,
java.lang.String contactNo)
This method opens the conversation screen for the contact
The number should have the Country code prefixed when it was saved,
else whatsapp will not open
|
static void |
showContactInAddressBook(android.content.Context context,
java.lang.String contactId)
Shows this contact in the Android's Contact Manager
|
public static boolean checkIfPhoneNumberExists(java.util.List<java.lang.String> phoneNumbers,
java.lang.String numberToCheck)
phoneNumbers - phone numbersnumberToCheck - number to check@NonNull public static java.lang.String cleanupPhoneNumber(java.lang.String formattedPhoneNumber)
formattedPhoneNumber - formatted phone numberpublic static void showContactInAddressBook(android.content.Context context,
java.lang.String contactId)
context - the contextcontactId - contactIdpublic static void openWhatsAppContact(android.content.Context context,
java.lang.String contactId)
context - the contextcontactId - the contact idpublic static void sendWhatsAppMethod(android.content.Context context,
java.lang.String contactNo)
context - contextcontactNo - contactNo