Lines Matching refs:contact
1 # @ohos.contact (Contacts)
3 The **contact** module provides contact management functions, such as adding, deleting, and updatin…
13 import { contact } from '@kit.ContactsKit';
16 ## contact.addContact<sup>10+</sup>
18 addContact(context: Context, contact: Contact, callback: AsyncCallback<number>): void
20 Adds a contact. This API uses an asynchronous callback to return the result.
33 | contact | [Contact](#contact) | Yes | Contact information. …
34 …o return the result. If the operation is successful, the ID of the added contact is returned. If t…
49 contact.addContact(
67 ## contact.addContact<sup>(deprecated)7+</sup>
69 addContact(contact:Contact, callback:AsyncCallback<number>): void
71 Adds a contact. This API uses an asynchronous callback to return the result.
85 | contact | [Contact](#contact) | Yes | Contact information. …
86 …o return the result. If the operation is successful, the ID of the added contact is returned. If t…
92 contact.addContact({
108 ## contact.addContact<sup>10+</sup>
110 addContact(context: Context, contact: Contact): Promise<number>
112 Adds a contact. This API uses a promise to return the result.
125 | contact | [Contact](#contact) | Yes | Contact information. …
131 | Promise<number> | Promise used to return the result, which is the ID of the added contact.|
146 let promise = contact.addContact(
163 ## contact.addContact<sup>(deprecated)7+</sup>
165 addContact(contact: Contact): Promise<number>
167 Adds a contact. This API uses a promise to return the result.
181 | contact | [Contact](#contact) | Yes | Contact information.|
187 | Promise<number> | Promise used to return the result, which is the ID of the added contact.|
193 let promise = contact.addContact({
208 ## contact.deleteContact<sup>10+</sup>
212 Deletes a contact based on the specified contact key. This API uses an asynchronous callback to ret…
223 | key | string | Yes | Unique query key of a contact. One contact correspo…
224 …return the result. If the operation is successful, the ID of the deleted contact is returned. If t…
239 contact.deleteContact(context, 'xxx', (err: BusinessError) => {
248 ## contact.deleteContact<sup>(deprecated)7+</sup>
252 Deletes a contact based on the specified contact key. This API uses an asynchronous callback to ret…
266 | key | string | Yes | Unique query key of a contact. One contact correspo…
267 …return the result. If the operation is successful, the ID of the deleted contact is returned. If t…
273 contact.deleteContact('xxx', (err: BusinessError) => {
283 ## contact.deleteContact<sup>10+</sup>
287 Deletes a contact based on the specified contact key. This API uses a promise to return the result.
298 | key | string | Yes | Unique query key of a contact. One contact corresponds to one key. …
319 let promise = contact.deleteContact(context, 'xxx');
327 ## contact.deleteContact<sup>(deprecated)7+</sup>
331 Deletes a contact based on the specified contact key. This API uses a promise to return the result.
345 | key | string | Yes | Unique query key of a contact. One contact corresponds to one key.|
357 let promise = contact.deleteContact('xxx');
366 ## contact.updateContact<sup>10+</sup>
368 updateContact(context: Context, contact: Contact, callback: AsyncCallback<void>): void
370 Updates a contact based on the specified contact information. This API uses an asynchronous callbac…
381 | contact | [Contact](#contact) | Yes | Contact information. Contact ID, which is mandatory…
382 …return the result. If the operation is successful, the ID of the updated contact is returned. If t…
397 contact.updateContact(context, {
414 ## contact.updateContact<sup>(deprecated)7+</sup>
416 updateContact(contact: Contact, callback: AsyncCallback<void>): void
418 Updates a contact based on the specified contact information. This API uses an asynchronous callbac…
432 | contact | [Contact](#contact) | Yes | Contact information. Contact ID, which is mandatory…
433 …return the result. If the operation is successful, the ID of the updated contact is returned. If t…
439 contact.updateContact({
457 ## contact.updateContact<sup>10+</sup>
459 updateContact(context: Context, contact: Contact, attrs: ContactAttributes, callback: AsyncCallbac…
461 Updates a contact based on the specified contact information. This API uses an asynchronous callbac…
472 | contact | [Contact](#contact) | Yes | Contact information. Contact ID, whic…
473 | attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes. …
474 …return the result. If the operation is successful, the ID of the updated contact is returned. If t…
489 contact.updateContact(context, {
498 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
508 ## contact.updateContact<sup>(deprecated)7+</sup>
510 updateContact(contact: Contact, attrs: ContactAttributes, callback: AsyncCallback<void>): void
512 Updates a contact based on the specified contact information. This API uses an asynchronous callbac…
526 | contact | [Contact](#contact) | Yes | Contact information. Contact ID, whic…
527 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attributes. …
528 …return the result. If the operation is successful, the ID of the updated contact is returned. If t…
534 contact.updateContact({
543 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
554 ## contact.updateContact<sup>10+</sup>
556 updateContact(context: Context, contact: Contact, attrs?: ContactAttributes): Promise<void>
558 Updates a contact based on the specified contact information and attributes. This API uses a promis…
569 | contact | [Contact](#contact) | Yes | Contact information. Contact ID, which…
570 | attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes. …
591 let promise = contact.updateContact(context, {
600 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
609 ## contact.updateContact<sup>(deprecated)7+</sup>
611 updateContact(contact: Contact, attrs?: ContactAttributes): Promise<void>
613 Updates a contact based on the specified contact information and attributes. This API uses a promis…
627 | contact | [Contact](#contact) | Yes | Contact information. Contact ID, which…
628 | attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes.|
639 let promise = contact.updateContact({
648 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
658 ## contact.isLocalContact<sup>10+</sup>
662 Checks whether the ID of this contact is in the local address book. This API uses an asynchronous c…
673 | id | number | Yes | Contact ID. Each contact corresponds to one ID. …
674 …sful, a Boolean value is returned. The value **true** indicates that the contact ID is in the loca…
689 contact.isLocalContact(context, /*id*/1, (err: BusinessError, data) => {
698 ## contact.isLocalContact<sup>(deprecated)7+</sup>
702 Checks whether the ID of this contact is in the local address book. This API uses an asynchronous c…
716 | id | number | Yes | Contact ID. Each contact corresponds to one ID. …
717 …sful, a Boolean value is returned. The value **true** indicates that the contact ID is in the loca…
723 contact.isLocalContact(/*id*/1, (err: BusinessError, data) => {
732 ## contact.isLocalContact<sup>10+</sup>
736 Checks whether the ID of this contact is in the local address book. This API uses a promise to retu…
747 | id | number | Yes | Contact ID. Each contact corresponds to one ID. |
753 …Promise used to return the result. The value **true** indicates that the contact ID is in the loca…
768 let promise = contact.isLocalContact(context, /*id*/1);
776 ## contact.isLocalContact<sup>(deprecated)7+</sup>
780 Checks whether the ID of this contact is in the local address book. This API uses a promise to retu…
794 | id | number | Yes | Contact ID. Each contact corresponds to one ID.|
800 …Promise used to return the result. The value **true** indicates that the contact ID is in the loca…
806 let promise = contact.isLocalContact(/*id*/1);
814 ## contact.isMyCard<sup>10+</sup>
818 Checks whether a contact is included in my card. This API uses an asynchronous callback to return t…
830 …sful, a Boolean value is returned. The value **true** indicates that the contact is included in my…
845 contact.isMyCard(context, /*id*/1, (err: BusinessError, data) => {
854 ## contact.isMyCard<sup>(deprecated)7+</sup>
858 Checks whether a contact is included in my card. This API uses an asynchronous callback to return t…
873 …sful, a Boolean value is returned. The value **true** indicates that the contact is included in my…
879 contact.isMyCard(/*id*/1, (err: BusinessError, data) => {
889 ## contact.isMyCard<sup>10+</sup>
893 Checks whether a contact is included in my card. This API uses a promise to return the result.
910 …Promise used to return the result. The value **true** indicates that the contact is included in my…
925 let promise = contact.isMyCard(context, /*id*/1);
933 ## contact.isMyCard<sup>(deprecated)7+</sup>
937 Checks whether a contact is included in my card. This API uses a promise to return the result.
957 …Promise used to return the result. The value **true** indicates that the contact is included in my…
963 let promise = contact.isMyCard(/*id*/1);
971 ## contact.queryMyCard<sup>10+</sup>
986 | callback | AsyncCallback<[Contact](#contact)> | Yes | Callback used to return the result. …
1001 contact.queryMyCard(context, (err: BusinessError, data) => {
1010 ## contact.queryMyCard<sup>(deprecated)7+</sup>
1028 | callback | AsyncCallback<[Contact](#contact)> | Yes | Callback used to return the result. …
1034 contact.queryMyCard((err: BusinessError, data) => {
1043 ## contact.queryMyCard<sup>10+</sup>
1058 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attributes. …
1059 | callback | AsyncCallback<[Contact](#contact)> | Yes | Callback used to return the result. …
1074 contact.queryMyCard(context, {
1075 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
1085 ## contact.queryMyCard<sup>(deprecated)7+</sup>
1103 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attributes. …
1104 | callback | AsyncCallback<[Contact](#contact)> | Yes | Callback used to return the result. …
1110 contact.queryMyCard({
1111 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
1121 ## contact.queryMyCard<sup>10+</sup>
1125 Queries my card based on the specified contact attributes. This API uses a promise to return the re…
1136 | attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes. …
1142 | Promise<[Contact](#contact)> | Promise used to return the result, which is a contact in my …
1157 let promise = contact.queryMyCard(context, {
1158 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
1167 ## contact.queryMyCard<sup>(deprecated)7+</sup>
1171 Queries my card based on the specified contact attributes. This API uses a promise to return the re…
1185 | attrs | [ContactAttributes](#contactattributes) | No | List of contact attributes.|
1190 | Promise<[Contact](#contact)> | Promise used to return the result, which is a contact in my …
1196 let promise = contact.queryMyCard({
1197 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
1207 ## contact.selectContact<sup>(deprecated)7+</sup>
1211 Selects a contact. This API uses an asynchronous callback to return the result.
1223 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
1229 contact.selectContact((err: BusinessError, data) => {
1239 ## contact.selectContact<sup>(deprecated)7+</sup>
1243 Selects a contact. This API uses a promise to return the result.
1255 | Promise<Array<[Contact](#contact)>> | Promise used to return the result, which is an …
1261 let promise = contact.selectContact();
1269 ## contact.selectContacts<sup>10+</sup>
1273 Selects a contact. This API uses an asynchronous callback to return the result.
1283 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
1295 contact.selectContacts((err: BusinessError, data) => {
1304 ## contact.selectContacts<sup>10+</sup>
1308 Selects a contact. This API uses a promise to return the result.
1318 | Promise<Array<[Contact](#contact)>> | Promise used to return the result, which is an …
1325 let promise = contact.selectContacts();
1333 ## contact.selectContacts<sup>10+</sup>
1337 Selects a contact. This API uses an asynchronous callback to return the result.
1348 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
1360 contact.selectContacts({
1371 ## contact.selectContacts<sup>10+</sup>
1375 Selects a contact. This API uses a promise to return the result.
1391 | Promise<Array<[Contact](#contact)>> | Promise used to return the result, which is an …
1403 let promise = contact.selectContacts({isMultiSelect:false});
1411 ## contact.queryContact<sup>10+</sup>
1415 Queries a contact based on the specified key. This API uses an asynchronous callback to return the …
1426 | key | string | Yes | Contact key. Each contact correspond…
1427 …allback<[Contact](#contact)> | Yes | Callback used to return the result. If the operation i…
1442 contact.queryContact(context, 'xxx', (err: BusinessError, data) => {
1451 ## contact.queryContact<sup>(deprecated)7+</sup>
1455 Queries a contact based on the specified key. This API uses an asynchronous callback to return the …
1469 | key | string | Yes | Contact key. Each contact correspond…
1470 …allback<[Contact](#contact)> | Yes | Callback used to return the result. If the operation i…
1476 contact.queryContact('xxx', (err: BusinessError, data) => {
1486 ## contact.queryContact<sup>10+</sup>
1490 Queries a contact based on the specified key and holder. This API uses an asynchronous callback to …
1501 | key | string | Yes | Contact key. Each contact correspond…
1503 …allback<[Contact](#contact)> | Yes | Callback used to return the result. If the operation i…
1518 contact.queryContact(context, 'xxx', {
1531 ## contact.queryContact<sup>(deprecated)7+</sup>
1535 Queries a contact based on the specified key and holder. This API uses an asynchronous callback to …
1549 | key | string | Yes | Contact key. Each contact correspond…
1551 …allback<[Contact](#contact)> | Yes | Callback used to return the result. If the operation i…
1557 contact.queryContact('xxx', {
1570 ## contact.queryContact<sup>10+</sup>
1574 Queries a contact based on the specified key and attributes. This API uses an asynchronous callback…
1585 | key | string | Yes | Contact key. Each contact correspond…
1586 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attributes. …
1587 …allback<[Contact](#contact)> | Yes | Callback used to return the result. If the operation i…
1602 contact.queryContact(context, 'xxx', {
1603 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
1613 ## contact.queryContact<sup>(deprecated)7+</sup>
1617 Queries a contact based on the specified key and attributes. This API uses an asynchronous callback…
1631 | key | string | Yes | Contact key. Each contact correspond…
1632 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attributes. …
1633 …allback<[Contact](#contact)> | Yes | Callback used to return the result. If the operation i…
1639 contact.queryContact('xxx', {
1640 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
1650 ## contact.queryContact<sup>10+</sup>
1654 Queries a contact based on the specified key, holder, and attributes. This API uses an asynchronous…
1665 | key | string | Yes | Contact key. Each contact correspond…
1667 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attributes. …
1668 …allback<[Contact](#contact)> | Yes | Callback used to return the result. If the operation i…
1683 contact.queryContact(context, 'xxx', {
1688 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
1698 ## contact.queryContact<sup>(deprecated)7+</sup>
1702 Queries a contact based on the specified key, holder, and attributes. This API uses an asynchronous…
1716 | key | string | Yes | Contact key. Each contact correspond…
1718 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attributes. …
1719 …allback<[Contact](#contact)> | Yes | Callback used to return the result. If the operation i…
1725 contact.queryContact('xxx', {
1730 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
1741 ## contact.queryContact<sup>10+</sup>
1745 Queries a contact based on the specified key, holder, and attributes. This API uses a promise to re…
1756 | key | string | Yes | Contact key. Each contact corresponds …
1757 … | No | Application information for a contact. If this parameter is not specified, it is not us…
1758 … | No | Contact attribute list. If this parameter is not specified, all contact attributes are qu…
1763 | Promise<[Contact](#contact)> | Promise used to return the result, which is thequeried conta…
1778 let promise = contact.queryContact(context, 'xxx', {
1783 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
1792 ## contact.queryContact<sup>(deprecated)7+</sup>
1796 Queries a contact based on the specified key, holder, and attributes. This API uses a promise to re…
1810 | key | string | Yes | Contact key. Each contact corresponds t…
1811 … | No | Application information for a contact. If this parameter is not specified, it is not us…
1812 … | No | Contact attribute list. If this parameter is not specified, all contact attributes are qu…
1817 | Promise<[Contact](#contact)> | Promise used to return the result, which is thequeried conta…
1823 let promise = contact.queryContact('xxx', {
1828 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
1837 ## contact.queryContacts<sup>10+</sup>
1852 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
1867 contact.queryContacts(context, (err: BusinessError, data) => {
1876 ## contact.queryContacts<sup>(deprecated)7+</sup>
1894 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
1900 contact.queryContacts((err: BusinessError, data) => {
1909 ## contact.queryContacts<sup>10+</sup>
1925 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
1940 contact.queryContacts(context, {
1953 ## contact.queryContacts<sup>(deprecated)7+</sup>
1972 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
1978 contact.queryContacts({
1991 ## contact.queryContacts<sup>10+</sup>
2006 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attribu…
2007 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2022 contact.queryContacts(context, {
2023 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2033 ## contact.queryContacts<sup>(deprecated)7+</sup>
2051 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attribu…
2052 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2058 contact.queryContacts({
2059 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2069 ## contact.queryContacts<sup>10+</sup>
2085 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attribu…
2086 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2101 contact.queryContacts(context, {
2106 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2116 ## contact.queryContacts<sup>(deprecated)7+</sup>
2135 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attribu…
2136 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2142 contact.queryContacts({
2147 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2157 ## contact.queryContacts<sup>10+</sup>
2172 … | No | Application information for a contact. If this parameter is not specified, it is not us…
2173 … | No | Contact attribute list. If this parameter is not specified, all contact attributes are qu…
2178 | Promise<Array<[Contact](#contact)>> | Promise used to return the result, which is an …
2193 let promise = contact.queryContacts(context, {
2198 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2207 ## contact.queryContacts<sup>(deprecated)7+</sup>
2225 … | No | Application information for a contact. If this parameter is not specified, it is not us…
2226 … | No | Contact attribute list. If this parameter is not specified, all contact attributes are qu…
2232 | Promise<Array<[Contact](#contact)>> | Promise used to return the result, which is an …
2238 let promise = contact.queryContacts({
2243 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2252 ## contact.queryContactsByPhoneNumber<sup>10+</sup>
2268 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to ret…
2283 contact.queryContactsByPhoneNumber(context, '138xxxxxxxx', (err: BusinessError, data) => {
2292 ## contact.queryContactsByPhoneNumber<sup>(deprecated)7+</sup>
2311 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to ret…
2317 contact.queryContactsByPhoneNumber('138xxxxxxxx', (err: BusinessError, data) => {
2327 ## contact.queryContactsByPhoneNumber<sup>10+</sup>
2344 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to ret…
2359 contact.queryContactsByPhoneNumber(context, '138xxxxxxxx', {
2372 ## contact.queryContactsByPhoneNumber<sup>(deprecated)7+</sup>
2392 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to ret…
2398 contact.queryContactsByPhoneNumber('138xxxxxxxx', {
2411 ## contact.queryContactsByPhoneNumber<sup>10+</sup>
2427 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attr…
2428 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to ret…
2443 contact.queryContactsByPhoneNumber(context, '138xxxxxxxx', {
2444 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2454 ## contact.queryContactsByPhoneNumber<sup>(deprecated)7+</sup>
2473 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attr…
2474 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to ret…
2480 contact.queryContactsByPhoneNumber('138xxxxxxxx', {
2481 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2491 ## contact.queryContactsByPhoneNumber<sup>10+</sup>
2508 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attr…
2509 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to ret…
2524 contact.queryContactsByPhoneNumber(context, '138xxxxxxxx', {
2529 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2539 ## contact.queryContactsByPhoneNumber<sup>(deprecated)7+</sup>
2559 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attr…
2560 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to ret…
2566 contact.queryContactsByPhoneNumber('138xxxxxxxx', {
2571 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2581 ## contact.queryContactsByPhoneNumber<sup>10+</sup>
2597 … | No | Application information for a contact. If this parameter is not specified, it is not us…
2598 … | No | Contact attribute list. If this parameter is not specified, all contact attributes are qu…
2604 | Promise<Array<[Contact](#contact)>> | Promise used to return the result, which is an …
2619 let promise = contact.queryContactsByPhoneNumber(context, '138xxxxxxxx', {
2624 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2633 ## contact.queryContactsByPhoneNumber<sup>(deprecated)7+</sup>
2652 … | No | Application information for a contact. If this parameter is not specified, it is not us…
2653 … | No | Contact attribute list. If this parameter is not specified, all contact attributes are qu…
2659 | Promise<Array<[Contact](#contact)>> | Promise used to return the result, which is an …
2665 let promise = contact.queryContactsByPhoneNumber('138xxxxxxxx', {
2670 attributes: [contact.Attribute.ATTR_NAME, contact.Attribute.ATTR_PHONE]
2679 ## contact.queryContactsByEmail<sup>10+</sup>
2694 … | Yes | Email address of the contact. …
2695 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2710 contact.queryContactsByEmail(context, 'xxx@email.com', (err: BusinessError, data) => {
2719 ## contact.queryContactsByEmail<sup>(deprecated)7+</sup>
2737 … | Yes | Email address of the contact. …
2738 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2744 contact.queryContactsByEmail('xxx@email.com', (err: BusinessError, data) => {
2753 ## contact.queryContactsByEmail<sup>10+</sup>
2757 Queries a contact based on the specified email and holder. This API uses an asynchronous callback t…
2768 … | Yes | Email address of the contact. …
2770 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2785 contact.queryContactsByEmail(context, 'xxx@email.com', {
2798 ## contact.queryContactsByEmail<sup>(deprecated)7+</sup>
2802 Queries a contact based on the specified email and holder. This API uses an asynchronous callback t…
2816 … | Yes | Email address of the contact. …
2818 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2824 contact.queryContactsByEmail('xxx@email.com', {
2837 ## contact.queryContactsByEmail<sup>10+</sup>
2841 Queries a contact based on the specified email and attributes. This API uses an asynchronous callba…
2852 … | Yes | Email address of the contact. …
2853 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attribu…
2854 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2869 contact.queryContactsByEmail(context, 'xxx@email.com', {
2870 attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME]
2880 ## contact.queryContactsByEmail<sup>(deprecated)7+</sup>
2884 Queries a contact based on the specified email and attributes. This API uses an asynchronous callba…
2898 … | Yes | Email address of the contact. …
2899 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attribu…
2900 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2906 contact.queryContactsByEmail('xxx@email.com', {
2907 attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME]
2917 ## contact.queryContactsByEmail<sup>10+</sup>
2921 Queries a contact based on the specified email, holder, and attributes. This API uses an asynchrono…
2932 … | Yes | Email address of the contact. …
2934 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attribu…
2935 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2950 contact.queryContactsByEmail(context, 'xxx@email.com', {
2955 attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME]
2965 ## contact.queryContactsByEmail<sup>(deprecated)7+</sup>
2969 Queries a contact based on the specified email, holder, and attributes. This API uses an asynchrono…
2983 … | Yes | Email address of the contact. …
2985 | attrs | [ContactAttributes](#contactattributes) | Yes | List of contact attribu…
2986 | callback | AsyncCallback<Array<[Contact](#contact)>> | Yes | Callback used to return…
2992 contact.queryContactsByEmail('xxx@email.com', {
2997 attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME]
3007 ## contact.queryContactsByEmail<sup>10+</sup>
3011 Queries a contact based on the specified email, holder, and attributes. This API uses a promise to …
3022 | email | string | Yes | Email address of the contact. …
3023 … | No | Application information for a contact. If this parameter is not specified, it is not us…
3024 … | No | Contact attribute list. If this parameter is not specified, all contact attributes are qu…
3030 | Promise<Array<[Contact](#contact)>> | Promise used to return the result, which is an …
3045 let promise = contact.queryContactsByEmail(context, 'xxx@email.com', {
3050 attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME]
3059 ## contact.queryContactsByEmail<sup>(deprecated)7+</sup>
3063 Queries a contact based on the specified email, holder, and attributes. This API uses a promise to …
3077 | email | string | Yes | Email address of the contact. |
3078 … | No | Application information for a contact. If this parameter is not specified, it is not us…
3079 … | No | Contact attribute list. If this parameter is not specified, all contact attributes are qu…
3085 | Promise<Array<[Contact](#contact)>> | Promise used to return the result, which is an …
3091 let promise = contact.queryContactsByEmail('xxx@email.com', {
3096 attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME]
3105 ## contact.queryGroups<sup>10+</sup>
3109 Queries all groups of this contact. This API uses an asynchronous callback to return the result.
3135 contact.queryGroups(context, (err: BusinessError, data) => {
3144 ## contact.queryGroups<sup>(deprecated)7+</sup>
3148 Queries all groups of this contact. This API uses an asynchronous callback to return the result.
3168 contact.queryGroups((err: BusinessError, data) => {
3177 ## contact.queryGroups<sup>10+</sup>
3181 Queries all groups of this contact based on the specified holder. This API uses an asynchronous cal…
3208 contact.queryGroups(context, {
3221 ## contact.queryGroups<sup>(deprecated)7+</sup>
3225 Queries all groups of this contact based on the specified holder. This API uses an asynchronous cal…
3246 contact.queryGroups({
3259 ## contact.queryGroups<sup>10+</sup>
3263 Queries all groups of this contact based on the specified holder. This API uses a promise to return…
3274 | holder | [Holder](#holder) | No | Application information for a contact. If this parameter is n…
3295 let promise = contact.queryGroups(context, {
3307 ## contact.queryGroups<sup>(deprecated)7+</sup>
3311 Queries all groups of this contact based on the specified holder. This API uses a promise to return…
3325 | holder | [Holder](#holder) | No | Application information for a contact. If this parameter is no…
3337 let promise = contact.queryGroups({
3349 ## contact.queryHolders<sup>10+</sup>
3379 contact.queryHolders(context, (err: BusinessError, data) => {
3388 ## contact.queryHolders<sup>(deprecated)7+</sup>
3412 contact.queryHolders((err: BusinessError, data) => {
3421 ## contact.queryHolders<sup>10+</sup>
3456 let promise = contact.queryHolders(context);
3464 ## contact.queryHolders<sup>(deprecated)7+</sup>
3488 let promise = contact.queryHolders();
3496 ## contact.queryKey<sup>10+</sup>
3500 Queries the key of a contact based on the specified contact ID. This API uses an asynchronous callb…
3512 …eturn the result. If the operation is successful, the key of the queried contact is returned. If t…
3527 contact.queryKey(context, /*id*/1, (err: BusinessError, data) => {
3536 ## contact.queryKey<sup>(deprecated)7+</sup>
3540 Queries the key of a contact based on the specified contact ID. This API uses an asynchronous callb…
3555 …eturn the result. If the operation is successful, the key of the queried contact is returned. If t…
3561 contact.queryKey(/*id*/1, (err: BusinessError, data) => {
3570 ## contact.queryKey<sup>10+</sup>
3574 Queries the key of a contact based on the specified contact ID and holder. This API uses an asynchr…
3587 …eturn the result. If the operation is successful, the key of the queried contact is returned. If t…
3602 contact.queryKey(context, /*id*/1, {
3615 ## contact.queryKey<sup>(deprecated)7+</sup>
3619 Queries the key of a contact based on the specified contact ID and holder. This API uses an asynchr…
3635 …eturn the result. If the operation is successful, the key of the queried contact is returned. If t…
3641 contact.queryKey(/*id*/1, {
3654 ## contact.queryKey<sup>10+</sup>
3658 Queries the key of a contact based on the specified contact ID and holder. This API uses a promise …
3670 …r) | No | Application information for a contact. If this parameter is not specified, it is not us…
3676 …romise<string> | Promise used to return the result, which is the key of the queried contact.|
3691 let promise = contact.queryKey(context, /*id*/1, {
3703 ## contact.queryKey<sup>(deprecated)7+</sup>
3707 Queries the key of a contact based on the specified contact ID and holder. This API uses a promise …
3722 …r) | No | Application information for a contact. If this parameter is not specified, it is not us…
3728 …romise<string> | Promise used to return the result, which is the key of the queried contact.|
3734 let promise = contact.queryKey(/*id*/1, {
3748 Defines the contact selection options.
3762 Defines a contact.
3772 | INVALID_CONTACT_ID | -1 |Yes | Default contact ID.|
3781 | contactAttributes | [ContactAttributes](#contactattributes) | Yes | Yes | List of contact attri…
3782 …l)[] | Yes | Yes | List of email addresses of the contact. |
3783 … | Yes | Yes | List of important dates such as birthdays and anniversaries of the contact.|
3784 …p](#group)[] | Yes | Yes | List of groups of the contact. …
3785 …ess)[] | Yes | Yes | List of instant message addresses of the contact. |
3786 …r](#phonenumber)[] | Yes | Yes | List of phone numbers of the contact. |
3788 …](#postaladdress)[] | Yes | Yes | List of postal addresses of the contact. |
3789 …lation)[] | Yes | Yes | List of relationships with the contact. …
3790 …] | Yes | Yes | List of Session Initiation Protocol (SIP) addresses of the contact. |
3791 …e](#website)[] | Yes | Yes | List of websites of the contact. …
3795 …ganization](#organization) | Yes | Yes | Organization of the contact. …
3800 Create contact data in JSON format:
3804 let myContact: contact.Contact = {
3822 Provides a list of contact attributes, which are generally used as arguments.
3831 | attributes | [Attribute](#attribute)[] | Yes | Yes | List of contact attributes.|
3836 Create contact data in JSON format:
3840 let contactAttributes: contact.ContactAttributes = {
3842 contact.Attribute.ATTR_EMAIL,
3843 contact.Attribute.ATTR_NAME,
3844 contact.Attribute.ATTR_PHONE
3852 Enumerates contact attributes.
3860 | ATTR_CONTACT_EVENT | Important dates such as birthday and anniversaries of the contact.|
3861 | ATTR_EMAIL | Email address of the contact. |
3862 | ATTR_GROUP_MEMBERSHIP | Groups of the contact. |
3863 | ATTR_IM | IM addresses of the contact. |
3867 | ATTR_ORGANIZATION | Organization of the contact. |
3870 | ATTR_POSTAL_ADDRESS | Postal address of the contact. |
3871 | ATTR_RELATION | Relationship with the contact. |
3872 | ATTR_SIP_ADDRESS | SIP addresses of the contact. |
3873 | ATTR_WEBSITE | Website that stores the contact information. |
3878 Create contact data in JSON format:
3881 let attributes = [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME, contact.Attribute.ATTR…
3887 Defines a contact's email.
3916 Create contact data in JSON format:
3919 let email: contact.Email = {
3929 let email = new contact.Email();
3936 Defines an application that creates the contact.
3949 Create contact data in JSON format:
3952 let holder: contact.Holder = {
3962 Defines a contact's event.
3990 Create contact data in JSON format:
3993 let event: contact.Event = {
4001 let event = new contact.Event();
4008 Defines a contact group.
4016 | groupId | number | Yes | Yes | ID of a contact group. |
4017 | title | string | Yes | Yes | Name of a contact group.|
4022 Create contact data in JSON format:
4025 let group: contact.Group = {
4066 Create contact data in JSON format:
4069 let imAddress: contact.ImAddress = {
4079 let imAddress = new contact.ImAddress();
4086 Defines a contact's name.
4096 | fullName | string | Yes | Yes | Full name of the contact. |
4097 | givenName | string | Yes | Yes | Given name of the contact.|
4098 | givenNamePhonetic | string | Yes | Yes | Given name of the contact in pinyin. |
4099 | middleName | string | Yes | Yes | Middle name of the contact. |
4100 | middleNamePhonetic | string | Yes | Yes | Middle name of the contact in pinyin. |
4101 | namePrefix | string | Yes | Yes | Prefix of the contact name. |
4102 | nameSuffix | string | Yes | Yes | Suffix of the contact name. |
4107 Create contact data in JSON format:
4110 let name: contact.Name = {
4119 Defines a contact's nickname.
4132 Create contact data in JSON format:
4135 let nickName: contact.NickName = {
4142 Defines a contact's note.
4150 | noteContent | string | Yes | Yes | Notes of the contact.|
4155 Create contact data in JSON format:
4158 let note: contact.Note = {
4166 Defines a contact's organization.
4180 Create contact data in JSON format:
4183 let organization: contact.Organization = {
4192 Defines a contact's phone number.
4237 Create contact data in JSON format:
4240 let phoneNumber: contact.PhoneNumber = {
4242 labelId: contact.PhoneNumber.NUM_HOME
4249 let phoneNumber = new contact.PhoneNumber();
4256 Defines a contact's portrait.
4269 Create contact data in JSON format:
4272 let portrait: contact.Portrait = {
4280 Defines a contact's postal address.
4301 | city | string | Yes | Yes | City where the contact is located. |
4302 | country | string | Yes | Yes | Country/Region where the contact is located. |
4304 | neighborhood | string | Yes | Yes | Neighbor of the contact. |
4305 | pobox | string | Yes | Yes | Email of the contact. |
4306 | postalAddress | string | Yes | Yes | Postal address of the contact. |
4307 | postcode | string | Yes | Yes | Postal code of the region where the contact is located.|
4308 | region | string | Yes | Yes | Area where the contact is located. |
4309 | street | string | Yes | Yes | Street where the contact resides. |
4315 Create contact data in JSON format:
4318 let postalAddress: contact.PostalAddress = {
4327 let postalAddress = new contact.PostalAddress();
4335 Defines a contact's relationship.
4374 Create contact data in JSON format:
4377 let relation: contact.Relation = {
4379 labelId: contact.Relation.RELATION_ASSISTANT
4386 let relation = new contact.Relation();
4388 relation.labelId = contact.Relation.RELATION_ASSISTANT;
4394 Defines a contact's SIP address.
4421 Create contact data in JSON format:
4424 let sipAddress: contact.SipAddress = {
4432 let sipAddress = new contact.SipAddress();
4439 Defines a contact's website.
4447 | website | string | Yes | Yes | Website of the contact.|
4452 Create contact data in JSON format:
4455 let website: contact.Website = {