Mesibo Phone Contacts APIs - Introduction
The mesibo Phone Contacts API simplifies the process of interacting with native phone contacts on both Android and iOS devices, offering a platform-agnostic approach. If your application involves phone-based login or requires user phone numbers in any way, you'll find Mesibo's Phone Contacts APIs incredibly valuable.
Key functionalities of mesibo phone contacts API includes:
mesibo phone contact APIs seamlessly integrate with Android and iOS contact APIs, offering a platform independent way to access the phone's address book.
mesibo phone Number API offers robust validation and standardization capabilities for validating worldwide phone numbers. It employs a sophisticated array of algorithms to rectify phone numbers, including the identification of missing country codes, checking that the number matches the patterns for that country, confirming the length is valid, and more. The API can output the validated number in different formats: E.164 format without the + sign, national format for that country, and a display format.
It is important to present phone numbers in a manner familiar to your users. However, phone number formats differ a lot between countries and regions. Some places use parentheses around the area code, while others use spaces or dashes to separate the numbers. There can even be different formats within one country, like for cell phones versus landlines. mesibo's Phone Number API possesses comprehensive knowledge of global phone number formats and can convert phone numbers to conform to the specific formatting rules of the country to which they belong.
Monitor and detect phone contact additions and deletions. Apps can be notified of contact changes via listener callbacks
In this section, we'll provide an overview of basic usage for mesibo's Phone Contact APIs. Subsequent sections will delve into advanced topics like monitoring phone contact changes, server and cross-device synchronization, validation options, and more.
To use mesibo's phone contact APIs, you need to first access the
MesiboPhoneContactsManager and initialize it as demonstrated below. Please note that your app MUST possess or request contacts permissions before using the mesibo phone contact APIs.
MesiboPhoneContactsManager phoneManager = Mesibo.getPhoneContactsManager();
You can then validate and look up phone numbers as follows. It will correct any issues and add country code if missing. It will also detect name country and actual type of the phone number.
MesiboPhoneContacts contact = phoneManager.getPhoneNumberInfo(phoneNumber, true);
// access phone information if the phone number is valid
int type = contact.type; // Type of phone number (mobile, landline, etc)
String name = contact.name; // Name from the phone book
String phoneNumber = contact.phoneNumber; // validated and corrected phone number
String country = country.country; //Country name
MesiboPhoneContactsManager will remain actively monitoring changes in phone contacts. To alter this behavior, you can opt to provide
false as an argument to the
In the next section, we will describe validating and formatting in more details.