java.lang.Object | |
↳ | com.gsma.services.rcs.contact.ContactUtil |
Utility class for validation and unique formatting of phone numbers
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ContactId |
formatContact(String contact)
Formats the given contact to uniquely represent a RCS contact phone number.
| ||||||||||
static ContactUtil |
getInstance(Context context)
Gets a singleton instance of ContactUtil.
| ||||||||||
String |
getMyCountryAreaCode()
Gets the user country area code.
| ||||||||||
String |
getMyCountryCode()
Gets the user country code.
| ||||||||||
Uri |
getVCard(Uri contactUri)
Returns the vCard of a contact.
| ||||||||||
boolean |
isMyCountryCodeDefined()
Checks if my country code is defined.
| ||||||||||
boolean |
isValidContact(String contact)
Checks the validity of a contact number.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Formats the given contact to uniquely represent a RCS contact phone number.
contact | the contact phone number to format. |
---|
RcsPermissionDeniedException | if the mobile country code failed to be read and is required to format the contact. |
---|
Gets a singleton instance of ContactUtil.
context | the context. |
---|
Gets the user country area code.
RcsPermissionDeniedException | thrown if the mobile country code failed to be read. |
---|
Gets the user country code.
RcsPermissionDeniedException | if the mobile country code failed to be read. |
---|
Returns the vCard of a contact. The contact parameter contains the database URI of the contact in the address book. The method returns a Uri to the visit card. The visit card filename has the file extension .vcf and is generated from the address book vCard URI (see Android SDK attribute ContactsContract.Contacts.CONTENT_VCARD_URI which returns the referenced contact formatted as a vCard when opened through openAssetFileDescriptor(Uri, String)).
contactUri | Contact URI of the contact in the address book |
---|
RcsGenericException |
---|
Checks if my country code is defined.
Checks the validity of a contact number.
contact | the contact number. |
---|
RcsPermissionDeniedException | if the mobile country code failed to be read and is required to validate the contact. |
---|