You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2013/10/01 05:56:01 UTC
svn commit: r1527865 [4/25] - in /cordova/site/public/docs/en/3.1.0: ./ img/
img/guide/ img/guide/cli/ img/guide/platforms/ img/guide/platforms/android/
img/guide/platforms/bada/ img/guide/platforms/blackberry10/
img/guide/platforms/ios/ img/guide/plat...
Added: cordova/site/public/docs/en/3.1.0/cordova_contacts_contacts.md.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/3.1.0/cordova_contacts_contacts.md.html?rev=1527865&view=auto
==============================================================================
--- cordova/site/public/docs/en/3.1.0/cordova_contacts_contacts.md.html (added)
+++ cordova/site/public/docs/en/3.1.0/cordova_contacts_contacts.md.html Tue Oct 1 03:55:57 2013
@@ -0,0 +1,1557 @@
+<!DOCTYPE html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
+<meta name="generator" content="joDoc">
+<title>Apache Cordova API Documentation</title>
+<link rel="stylesheet" type="text/css" href="index.css">
+<link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)">
+<link rel="stylesheet" type="text/css" href="prettify/prettify.css">
+</head>
+<body>
+ <div id="header">
+ <h1><a href="index.html">Apache <strong>Cordova</strong> Documentation</a></h1>
+ <small>
+ <select><optgroup label="Chinese" value="zh"><option value="edge">edge</option></optgroup>
+<optgroup label="English" value="en">
+<option value="edge">edge</option>
+<option selected value="3.1.0">3.1.0</option>
+<option value="3.0.0">3.0.0</option>
+<option value="2.9.0">2.9.0</option>
+<option value="2.8.0">2.8.0</option>
+<option value="2.7.0">2.7.0</option>
+<option value="2.6.0">2.6.0</option>
+<option value="2.5.0">2.5.0</option>
+<option value="2.4.0">2.4.0</option>
+<option value="2.3.0">2.3.0</option>
+<option value="2.2.0">2.2.0</option>
+<option value="2.1.0">2.1.0</option>
+<option value="2.0.0">2.0.0</option>
+<option value="1.9.0">1.9.0</option>
+<option value="1.8.1">1.8.1</option>
+<option value="1.8.0">1.8.0</option>
+<option value="1.7.0">1.7.0</option>
+<option value="1.6.1">1.6.1</option>
+<option value="1.6.0">1.6.0</option>
+<option value="1.5.0">1.5.0</option>
+</optgroup>
+<optgroup label="French" value="fr"><option value="edge">edge</option></optgroup>
+<optgroup label="German" value="de"><option value="edge">edge</option></optgroup>
+<optgroup label="Italian" value="it"><option value="edge">edge</option></optgroup>
+<optgroup label="Japanese" value="ja">
+<option value="edge">edge</option>
+<option value="2.2.0">2.2.0</option>
+<option value="2.1.0">2.1.0</option>
+<option value="2.0.0">2.0.0</option>
+<option value="1.9.0">1.9.0</option>
+<option value="1.8.1">1.8.1</option>
+<option value="1.7.0">1.7.0</option>
+</optgroup>
+<optgroup label="Korean" value="ko">
+<option value="edge">edge</option>
+<option value="2.0.0">2.0.0</option>
+</optgroup>
+<optgroup label="Russian" value="ru"><option value="edge">edge</option></optgroup>
+<optgroup label="Spanish" value="es"><option value="edge">edge</option></optgroup></select></small>
+ </div>
+ <div id="subheader">
+ <h1>Contacts</h1>
+ <small><select><option value="Contacts">Contacts</option>
+<option value="Contacts_methods">Â Â Â Â Â Â - Methods</option>
+<option value="Contacts_arguments">Â Â Â Â Â Â - Arguments</option>
+<option value="Contacts_objects">Â Â Â Â Â Â - Objects</option>
+<option value="Contacts_accessing_the_feature">Â Â Â Â Â Â - Accessing the Feature</option>
+<option value="contacts.create">contacts.create</option>
+<option value="contacts.create_description">Â Â Â Â Â Â - Description</option>
+<option value="contacts.create_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="contacts.create_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="contacts.create_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="contacts.find">contacts.find</option>
+<option value="contacts.find_description">Â Â Â Â Â Â - Description</option>
+<option value="contacts.find_parameters">Â Â Â Â Â Â - Parameters</option>
+<option value="contacts.find_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="contacts.find_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="contacts.find_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="Contact">Contact</option>
+<option value="Contact_properties">Â Â Â Â Â Â - Properties</option>
+<option value="Contact_methods">Â Â Â Â Â Â - Methods</option>
+<option value="Contact_details">Â Â Â Â Â Â - Details</option>
+<option value="Contact_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="Contact_save_quick_example">Â Â Â Â Â Â - Save Quick Example</option>
+<option value="Contact_clone_quick_example">Â Â Â Â Â Â - Clone Quick Example</option>
+<option value="Contact_remove_quick_example">Â Â Â Â Â Â - Remove Quick Example</option>
+<option value="Contact_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="Contact_android_2_x_quirks">Â Â Â Â Â Â - Android 2.X Quirks</option>
+<option value="Contact_blackberry_webworks_os_5_0_and_higher_quirks">Â Â Â Â Â Â - BlackBerry WebWorks (OS 5.0 and higher) Quirks</option>
+<option value="Contact_ios_quirks">Â Â Â Â Â Â - iOS Quirks</option>
+<option value="Contact_windows_phone_7_and_8_quirks">Â Â Â Â Â Â - Windows Phone 7 and 8 Quirks</option>
+<option value="ContactAddress">ContactAddress</option>
+<option value="ContactAddress_properties">Â Â Â Â Â Â - Properties</option>
+<option value="ContactAddress_details">Â Â Â Â Â Â - Details</option>
+<option value="ContactAddress_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="ContactAddress_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="ContactAddress_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="ContactAddress_android_2_x_quirks">Â Â Â Â Â Â - Android 2.X Quirks</option>
+<option value="ContactAddress_blackberry_webworks_os_5_0_and_higher_quirks">Â Â Â Â Â Â - BlackBerry WebWorks (OS 5.0 and higher) Quirks</option>
+<option value="ContactAddress_ios_quirks">Â Â Â Â Â Â - iOS Quirks</option>
+<option value="ContactField">ContactField</option>
+<option value="ContactField_properties">Â Â Â Â Â Â - Properties</option>
+<option value="ContactField_details">Â Â Â Â Â Â - Details</option>
+<option value="ContactField_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="ContactField_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="ContactField_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="ContactField_android_quirks">Â Â Â Â Â Â - Android Quirks</option>
+<option value="ContactField_blackberry_webworks_os_5_0_and_higher_quirks">Â Â Â Â Â Â - BlackBerry WebWorks (OS 5.0 and higher) Quirks</option>
+<option value="ContactField_ios_quirks">Â Â Â Â Â Â - iOS Quirks</option>
+<option value="ContactFindOptions">ContactFindOptions</option>
+<option value="ContactFindOptions_properties">Â Â Â Â Â Â - Properties</option>
+<option value="ContactFindOptions_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="ContactFindOptions_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="ContactFindOptions_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="ContactName">ContactName</option>
+<option value="ContactName_properties">Â Â Â Â Â Â - Properties</option>
+<option value="ContactName_details">Â Â Â Â Â Â - Details</option>
+<option value="ContactName_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="ContactName_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="ContactName_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="ContactName_android_quirks">Â Â Â Â Â Â - Android Quirks</option>
+<option value="ContactName_blackberry_webworks_os_5_0_and_higher_quirks">Â Â Â Â Â Â - BlackBerry WebWorks (OS 5.0 and higher) Quirks</option>
+<option value="ContactName_ios_quirks">Â Â Â Â Â Â - iOS Quirks</option>
+<option value="ContactOrganization">ContactOrganization</option>
+<option value="ContactOrganization_properties">Â Â Â Â Â Â - Properties</option>
+<option value="ContactOrganization_details">Â Â Â Â Â Â - Details</option>
+<option value="ContactOrganization_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="ContactOrganization_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="ContactOrganization_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="ContactOrganization_android_2_x_quirks">Â Â Â Â Â Â - Android 2.X Quirks</option>
+<option value="ContactOrganization_blackberry_webworks_os_5_0_and_higher_quirks">Â Â Â Â Â Â - BlackBerry WebWorks (OS 5.0 and higher) Quirks</option>
+<option value="ContactOrganization_ios_quirks">Â Â Â Â Â Â - iOS Quirks</option>
+<option value="ContactError">ContactError</option>
+<option value="ContactError_properties">Â Â Â Â Â Â - Properties</option>
+<option value="ContactError_constants">Â Â Â Â Â Â - Constants</option>
+<option value="ContactError_description">Â Â Â Â Â Â - Description</option>
+<option value="contactSuccess">contactSuccess</option>
+<option value="contactSuccess_parameters">Â Â Â Â Â Â - Parameters</option>
+<option value="contactSuccess_example">Â Â Â Â Â Â - Example</option>
+<option value="contactError">contactError</option>
+<option value="contactFields">contactFields</option>
+<option value="contactFindOptions">contactFindOptions</option>
+<option value="contactFindOptions_options">Â Â Â Â Â Â - Options</option></select></small>
+ </div>
+
+ <div id="sidebar">
+ <div class="vertical_divider"></div>
+ <h1>Guides</h1>
+<ul>
+<li><a href="guide_overview_index.md.html#Overview">Overview</a></li>
+<li><a href="guide_cli_index.md.html#The%20Command-line%20Interface">The Command-line Interface</a></li>
+<li><a href="guide_platforms_index.md.html#Platform%20Guides">Platform Guides</a></li>
+<li><a href="config_ref_index.md.html#The%20config.xml%20File">The config.xml File</a></li>
+<li><a href="guide_hybrid_webviews_index.md.html#Embedding%20WebViews">Embedding WebViews</a></li>
+<li><a href="guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide">Plugin Development Guide</a></li>
+<li><a href="guide_appdev_privacy_index.md.html#Privacy%20Guide">Privacy Guide</a></li>
+<li><a href="guide_appdev_whitelist_index.md.html#Domain%20Whitelist%20Guide">Domain Whitelist Guide</a></li>
+<li><a href="_index.html">Keyword Index</a></li>
+</ul>
+<h1>API Reference</h1>
+<ul>
+<li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li>
+<li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li>
+<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
+<li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li>
+<li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li>
+<li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li>
+<li><a href="cordova_device_device.md.html#Device">Device</a></li>
+<li><a href="cordova_events_events.md.html#Events">Events</a></li>
+<li><a href="cordova_file_file.md.html#File">File</a></li>
+<li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li>
+<li><a href="cordova_globalization_globalization.md.html#Globalization">Globalization</a></li>
+<li><a href="cordova_inappbrowser_inappbrowser.md.html#InAppBrowser">InAppBrowser</a></li>
+<li><a href="cordova_media_media.md.html#Media">Media</a></li>
+<li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li>
+<li><a href="cordova_splashscreen_splashscreen.md.html#Splashscreen">Splashscreen</a></li>
+<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
+</ul>
+</div>
+
+ <div id="scrollable">
+ <div id="content">
+ <h1><a name="Contacts">Contacts</a></h1>
+
+<blockquote>
+ <p>The <code>contacts</code> object provides access to the device contacts database.</p>
+</blockquote>
+
+<p><strong>Important privacy note:</strong> Collection and use of contact data raises
+important privacy issues. Your app's privacy policy should discuss
+how the app uses contact data and whether it is shared with any other
+parties. <a href="cordova_contacts_contacts.md.html#Contact">Contact</a> information is considered sensitive because it
+reveals the people with whom a person communicates. Therefore, in
+addition to your app's privacy policy, you should strongly consider
+providing a just-in-time notice prior to your app accessing or using
+contact data (if the device operating system doesn't do so
+already). That notice should provide the same information noted above,
+as well as obtaining the user's permission (e.g., by presenting
+choices for <strong>OK</strong> and <strong>No Thanks</strong>). Note that some app
+marketplaces may require your app to provide just-in-time notice and
+obtain permission from the user prior to accessing contact data. A
+clear and easy-to-understand user experience surrounding the use of
+contact data will help avoid user confusion and perceived misuse of
+contact data. For more information, please see the <a href="guide_appdev_privacy_index.md.html#Privacy%20Guide">Privacy Guide</a>.</p>
+
+<h2>
+<a name="Contacts_methods">Methods</a>
+</h2>
+
+<ul>
+<li><a href="cordova_contacts_contacts.md.html#contacts.create">contacts.create</a></li>
+<li><a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a></li>
+</ul>
+<h2>
+<a name="Contacts_arguments">Arguments</a>
+</h2>
+
+<ul>
+<li><a href="cordova_contacts_contacts.md.html#contactFields">contactFields</a></li>
+<li><a href="cordova_contacts_contacts.md.html#contactSuccess">contactSuccess</a></li>
+<li><a href="cordova_contacts_contacts.md.html#contactError">contactError</a></li>
+<li><a href="cordova_contacts_contacts.md.html#contactFindOptions">contactFindOptions</a></li>
+</ul>
+<h2>
+<a name="Contacts_objects">Objects</a>
+</h2>
+
+<ul>
+<li><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></li>
+<li><a href="cordova_contacts_contacts.md.html#ContactName">ContactName</a></li>
+<li><a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a></li>
+<li><a href="cordova_contacts_contacts.md.html#ContactAddress">ContactAddress</a></li>
+<li><a href="cordova_contacts_contacts.md.html#ContactOrganization">ContactOrganization</a></li>
+<li><a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a></li>
+<li><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a></li>
+</ul>
+<h2>
+<a name="Contacts_accessing_the_feature">Accessing the Feature</a>
+</h2>
+
+<p>As of version 3.0, Cordova implements device-level APIs as <em>plugins</em>.
+Use the CLI's <code>plugin</code> command, described in <a href="#The%20Command-line%0AInterface">The Command-line
+Interface</a>, to add or remove this feature for a project:</p>
+
+<pre class="prettyprint"><code> $ cordova plugin add org.apache.cordova.contacts
+ $ cordova plugin ls
+ [ 'org.apache.cordova.contacts' ]
+ $ cordova plugin rm org.apache.cordova.contacts
+</code></pre>
+
+<p>These commands apply to all targeted platforms, but modify the
+platform-specific configuration settings described below:</p>
+
+<ul>
+<li>
+<p>Android</p>
+
+<pre class="prettyprint"><code>(in app/res/xml/config.xml)
+<feature name="<a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a>">
+ <param name="android-package" value="org.apache.cordova.ContactManager" />
+</feature>
+
+
+(in app/AndroidManifest.xml)
+<uses-permission android:name="android.permission.GET_ACCOUNTS" />
+<uses-permission android:name="android.permission.READ_CONTACTS" />
+<uses-permission android:name="android.permission.WRITE_CONTACTS" />
+</code></pre>
+</li>
+<li>
+<p>BlackBerry WebWorks</p>
+
+<pre class="prettyprint"><code>(in www/plugins.xml)
+<feature name="<a href="cordova_contacts_contacts.md.html#Contact">Contact</a>">
+ <param name="blackberry-package" value="org.apache.cordova.pim.<a href="cordova_contacts_contacts.md.html#Contact">Contact</a>" />
+</feature>
+
+
+(in www/config.xml)
+<feature id="blackberry.find" required="true" version="1.0.0.0" />
+<feature id="blackberry.identity" required="true" version="1.0.0.0" />
+<feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
+<feature id="blackberry.pim.<a href="cordova_contacts_contacts.md.html#Contact">Contact</a>" required="true" version="1.0.0.0" />
+</code></pre>
+</li>
+<li>
+<p>iOS (in <code>config.xml</code>)</p>
+
+<pre class="prettyprint"><code><feature name="<a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a>">
+ <param name="ios-package" value="CDVContacts" />
+</feature>
+</code></pre>
+</li>
+<li>
+<p>Windows Phone</p>
+
+<pre class="prettyprint"><code>(in Properties/WPAppManifest.xml)
+<Capabilities>
+ <Capability Name="ID_CAP_CONTACTS" />
+</Capabilities>
+</code></pre>
+
+<p>Reference: <a class="external" href="http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx">Application Manifest for Windows Phone</a></p>
+</li>
+</ul>
+<p>Some platforms may support this feature without requiring any special
+configuration. See <em>Platform Support</em> in the <a href="guide_overview_index.md.html#Overview">Overview</a> section.</p>
+
+<hr>
+<h1><a name="contacts.create">contacts.create</a></h1>
+
+<p>Returns a new <a href="cordova_contacts_contacts.md.html#Contact">Contact</a> object.</p>
+
+<pre class="prettyprint"><code>var contact = navigator.<a href="cordova_contacts_contacts.md.html#contacts.create">contacts.create</a>(properties);
+</code></pre>
+
+<h2>
+<a name="contacts.create_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_contacts_contacts.md.html#contacts.create">contacts.create</a></code> method is synchronous, and returns a new <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object.</p>
+
+<p>This method does not retain the <a href="cordova_contacts_contacts.md.html#Contact">Contact</a> object in the device contacts
+database, for which you need to invoke the <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a>.save</code> method.</p>
+
+<h2>
+<a name="contacts.create_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+</ul>
+<h2>
+<a name="contacts.create_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>var myContact = navigator.<a href="cordova_contacts_contacts.md.html#contacts.create">contacts.create</a>({"displayName": "Test User"});
+</code></pre>
+
+<h2>
+<a name="contacts.create_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_contacts_contacts.md.html#Contact">Contact</a> Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ var myContact = navigator.<a href="cordova_contacts_contacts.md.html#contacts.create">contacts.create</a>({"displayName": "Test User"});
+ myContact.note = "This contact has a note.";
+ console.log("The contact, " + myContact.displayName + ", note: " + myContact.note);
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Create <a href="cordova_contacts_contacts.md.html#Contact">Contact</a></p>
+ </body>
+</html>
+</code></pre>
+
+<hr>
+<h1><a name="contacts.find">contacts.find</a></h1>
+
+<p>Queries the device contacts database and returns one or more <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code>
+objects, each containing the fields specified.</p>
+
+<pre class="prettyprint"><code>navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(<a href="cordova_contacts_contacts.md.html#contactFields">contactFields</a>, <a href="cordova_contacts_contacts.md.html#contactSuccess">contactSuccess</a>, <a href="cordova_contacts_contacts.md.html#contactError">contactError</a>, <a href="cordova_contacts_contacts.md.html#contactFindOptions">contactFindOptions</a>);
+</code></pre>
+
+<h2>
+<a name="contacts.find_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a></code> method executes asynchronously, querying the
+device contacts database and returning an array of <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> objects.
+The resulting objects are passed to the <code><a href="cordova_contacts_contacts.md.html#contactSuccess">contactSuccess</a></code> callback
+function specified by the <strong><a href="cordova_contacts_contacts.md.html#contactSuccess">contactSuccess</a></strong> parameter.</p>
+
+<p>The <strong><a href="cordova_contacts_contacts.md.html#contactFields">contactFields</a></strong> parameter specifies the fields to be used as a
+search qualifier, and only those results are passed to the
+<strong><a href="cordova_contacts_contacts.md.html#contactSuccess">contactSuccess</a></strong> callback function. A zero-length <strong><a href="cordova_contacts_contacts.md.html#contactFields">contactFields</a></strong>
+parameter is invalid and results in
+<code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a>.INVALID_ARGUMENT_ERROR</code>. A <strong><a href="cordova_contacts_contacts.md.html#contactFields">contactFields</a></strong> value of
+<code>"*"</code> returns all contact fields.</p>
+
+<p>The <strong><a href="cordova_contacts_contacts.md.html#contactFindOptions">contactFindOptions</a>.filter</strong> string can be used as a search
+filter when querying the contacts database. If provided, a
+case-insensitive, partial value match is applied to each field
+specified in the <strong><a href="cordova_contacts_contacts.md.html#contactFields">contactFields</a></strong> parameter. If there's a match for
+<em>any</em> of the specified fields, the contact is returned.</p>
+
+<h2>
+<a name="contacts.find_parameters">Parameters</a>
+</h2>
+
+<ul>
+<li><p><strong><a href="cordova_contacts_contacts.md.html#contactFields">contactFields</a></strong>: <a href="cordova_contacts_contacts.md.html#Contact">Contact</a> fields to use as a search qualifier. The resulting <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object only features values for these fields. <em>(DOMString[])</em> [Required]</p></li>
+<li><p><strong><a href="cordova_contacts_contacts.md.html#contactSuccess">contactSuccess</a></strong>: Success callback function invoked with the contacts returned from the database. [Required]</p></li>
+<li><p><strong><a href="cordova_contacts_contacts.md.html#contactError">contactError</a></strong>: Error callback function, invoked when an error occurs. [Optional]</p></li>
+<li><p><strong><a href="cordova_contacts_contacts.md.html#contactFindOptions">contactFindOptions</a></strong>: Search options to filter contacts. [Optional]</p></li>
+</ul>
+<h2>
+<a name="contacts.find_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="contacts.find_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>function onSuccess(contacts) {
+ alert('Found ' + contacts.length + ' contacts.');
+};
+
+function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+};
+
+// find all contacts with 'Bob' in any name field
+var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+options.filter = "Bob";
+options.multiple = true;
+var fields = ["displayName", "name"];
+navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(fields, onSuccess, onError, options);
+</code></pre>
+
+<h2>
+<a name="contacts.find_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_contacts_contacts.md.html#Contact">Contact</a> Example</title>
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // device APIs are available
+
+ function onDeviceReady() {
+ // find all contacts with 'Bob' in any name field
+ var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+ options.filter = "Bob";
+ var fields = ["displayName", "name"];
+ navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(fields, onSuccess, onError, options);
+ }
+
+ // onSuccess: Get a snapshot of the current contacts
+
+ function onSuccess(contacts) {
+ for (var i = 0; i < contacts.length; i++) {
+ console.log("Display Name = " + contacts[i].displayName);
+ }
+ }
+
+ // onError: Failed to get the contacts
+
+ function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+ }
+ </script>
+ </head>
+
+ <body>
+ <h1>Example</h1>
+ <p>Find <a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></p>
+ </body>
+</html>
+</code></pre>
+
+<hr>
+<h1><a name="Contact">Contact</a></h1>
+
+<p>Contains properties that describe a contact, such as a user's personal or business contact.</p>
+
+<h2>
+<a name="Contact_properties">Properties</a>
+</h2>
+
+<ul>
+<li><p><strong>id</strong>: A globally unique identifier. <em>(DOMString)</em></p></li>
+<li><p><strong>displayName</strong>: The name of this <a href="cordova_contacts_contacts.md.html#Contact">Contact</a>, suitable for display to end-users. <em>(DOMString)</em></p></li>
+<li><p><strong>name</strong>: An object containing all components of a persons name. <em>(<a href="cordova_contacts_contacts.md.html#ContactName">ContactName</a>)</em></p></li>
+<li><p><strong>nickname</strong>: A casual name by which to address the contact. <em>(DOMString)</em></p></li>
+<li><p><strong>phoneNumbers</strong>: An array of all the contact's phone numbers. <em>(<a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>[])</em></p></li>
+<li><p><strong>emails</strong>: An array of all the contact's email addresses. <em>(<a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>[])</em></p></li>
+<li><p><strong>addresses</strong>: An array of all the contact's addresses. <em>(<a href="cordova_contacts_contacts.md.html#ContactAddress">ContactAddress</a>[])</em></p></li>
+<li><p><strong>ims</strong>: An array of all the contact's IM addresses. <em>(<a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>[])</em></p></li>
+<li><p><strong>organizations</strong>: An array of all the contact's organizations. <em>(<a href="cordova_contacts_contacts.md.html#ContactOrganization">ContactOrganization</a>[])</em></p></li>
+<li><p><strong>birthday</strong>: The birthday of the contact. <em>(Date)</em></p></li>
+<li><p><strong>note</strong>: A note about the contact. <em>(DOMString)</em></p></li>
+<li><p><strong>photos</strong>: An array of the contact's photos. <em>(<a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>[])</em></p></li>
+<li><p><strong>categories</strong>: An array of all the user-defined categories associated with the contact. <em>(<a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>[])</em></p></li>
+<li><p><strong>urls</strong>: An array of web pages associated with the contact. <em>(<a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>[])</em></p></li>
+</ul>
+<h2>
+<a name="Contact_methods">Methods</a>
+</h2>
+
+<ul>
+<li><p><strong>clone</strong>: Returns a new <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object that is a deep copy of the calling object, with the <code>id</code> property set to <code>null</code>.</p></li>
+<li><p><strong>remove</strong>: Removes the contact from the device contacts database, otherwise executes an error callback with a <code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a></code> object.</p></li>
+<li><p><strong>save</strong>: Saves a new contact to the device contacts database, or updates an existing contact if a contact with the same <strong>id</strong> already exists.</p></li>
+</ul>
+<h2>
+<a name="Contact_details">Details</a>
+</h2>
+
+<p>The <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object represents a user's contact. <a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a> can be
+created, stored, or removed from the device contacts database.
+<a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a> can also be retrieved (individually or in bulk) from the
+database by invoking the <code><a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a></code> method.</p>
+
+<p><strong>NOTE:</strong> Not all of the contact fields listed above are supported on
+every <a href="#device%20platform">device platform</a>. Please check each platform's <em>Quirks</em> section
+for details.</p>
+
+<h2>
+<a name="Contact_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="Contact_save_quick_example">Save Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>function onSuccess(contact) {
+ alert("Save Success");
+};
+
+function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert("Error = " + <a href="cordova_contacts_contacts.md.html#contactError">contactError</a>.code);
+};
+
+// create a new contact object
+var contact = navigator.<a href="cordova_contacts_contacts.md.html#contacts.create">contacts.create</a>();
+contact.displayName = "Plumber";
+contact.nickname = "Plumber"; // specify both to support all devices
+
+// populate some fields
+var name = new <a href="cordova_contacts_contacts.md.html#ContactName">ContactName</a>();
+name.givenName = "Jane";
+name.familyName = "Doe";
+contact.name = name;
+
+// save to device
+contact.save(onSuccess,onError);
+</code></pre>
+
+<h2>
+<a name="Contact_clone_quick_example">Clone Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code> // clone the contact object
+ var clone = contact.clone();
+ clone.name.givenName = "John";
+ console.log("Original contact name = " + contact.name.givenName);
+ console.log("Cloned contact name = " + clone.name.givenName);
+</code></pre>
+
+<h2>
+<a name="Contact_remove_quick_example">Remove Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>function onSuccess() {
+ alert("Removal Success");
+};
+
+function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert("Error = " + <a href="cordova_contacts_contacts.md.html#contactError">contactError</a>.code);
+};
+
+ // remove the contact from the device
+ contact.remove(onSuccess,onError);
+</code></pre>
+
+<h2>
+<a name="Contact_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_contacts_contacts.md.html#Contact">Contact</a> Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ // create
+ var contact = navigator.<a href="cordova_contacts_contacts.md.html#contacts.create">contacts.create</a>();
+ contact.displayName = "Plumber";
+ contact.nickname = "Plumber"; // specify both to support all devices
+ var name = new <a href="cordova_contacts_contacts.md.html#ContactName">ContactName</a>();
+ name.givenName = "Jane";
+ name.familyName = "Doe";
+ contact.name = name;
+
+ // save
+ contact.save(onSaveSuccess,onSaveError);
+
+ // clone
+ var clone = contact.clone();
+ clone.name.givenName = "John";
+ console.log("Original contact name = " + contact.name.givenName);
+ console.log("Cloned contact name = " + clone.name.givenName);
+
+ // remove
+ contact.remove(onRemoveSuccess,onRemoveError);
+ }
+
+ // onSaveSuccess: Get a snapshot of the current contacts
+ //
+ function onSaveSuccess(contact) {
+ alert("Save Success");
+ }
+
+ // onSaveError: Failed to get the contacts
+ //
+ function onSaveError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert("Error = " + <a href="cordova_contacts_contacts.md.html#contactError">contactError</a>.code);
+ }
+
+ // onRemoveSuccess: Get a snapshot of the current contacts
+ //
+ function onRemoveSuccess(contacts) {
+ alert("Removal Success");
+ }
+
+ // onRemoveError: Failed to get the contacts
+ //
+ function onRemoveError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert("Error = " + <a href="cordova_contacts_contacts.md.html#contactError">contactError</a>.code);
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Find <a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></p>
+ </body>
+</html>
+</code></pre>
+
+<h2>
+<a name="Contact_android_2_x_quirks">Android 2.X Quirks</a>
+</h2>
+
+<ul>
+<li>
+<strong>categories</strong>: Not supported on Android 2.X devices, returning <code>null</code>.</li>
+</ul>
+<h2>
+<a name="Contact_blackberry_webworks_os_5_0_and_higher_quirks">BlackBerry WebWorks (OS 5.0 and higher) Quirks</a>
+</h2>
+
+<ul>
+<li><p><strong>id</strong>: Supported. Assigned by the device when saving the contact.</p></li>
+<li><p><strong>displayName</strong>: Supported. Stored in BlackBerry <strong>user1</strong> field.</p></li>
+<li><p><strong>nickname</strong>: Not supported, returning <code>null</code>.</p></li>
+<li><p><strong>phoneNumbers</strong>: Partially supported. Phone numbers are stored in BlackBerry fields <strong>homePhone1</strong> and <strong>homePhone2</strong> if <em>type</em> is 'home', <strong>workPhone1</strong> and <strong>workPhone2</strong> if <em>type</em> is 'work', <strong>mobilePhone</strong> if <em>type</em> is 'mobile', <strong>faxPhone</strong> if <em>type</em> is 'fax', <strong>pagerPhone</strong> if <em>type</em> is 'pager', and <strong>otherPhone</strong> if <em>type</em> is none of the above.</p></li>
+<li><p><strong>emails</strong>: Partially supported. The first three email addresses are stored in the BlackBerry <strong>email1</strong>, <strong>email2</strong>, and <strong>email3</strong> fields, respectively.</p></li>
+<li><p><strong>addresses</strong>: Partially supported. The first and second addresses are stored in the BlackBerry <strong>homeAddress</strong> and <strong>workAddress</strong> fields, respectively.</p></li>
+<li><p><strong>ims</strong>: Not supported, returning <code>null</code>.</p></li>
+<li><p><strong>organizations</strong>: Partially supported. The <strong>name</strong> and <strong>title</strong> of the first organization are stored in the BlackBerry <strong>company</strong> and <strong>title</strong> fields, respectively.</p></li>
+<li><p><strong>photos</strong>: Partially supported. A single thumbnail-sized photo is supported. To set a contact's photo, pass in a either a base64-encoded image, or a URL pointing to the image. The image is scaled down before saving to the BlackBerry contacts database. The contact photo is returned as a base64-encoded image.</p></li>
+<li><p><strong>categories</strong>: Partially supported. Only <em>Business</em> and <em>Personal</em> categories are supported.</p></li>
+<li><p><strong>urls</strong>: Partially supported. The first URL is stored in BlackBerry <strong>webpage</strong> field.</p></li>
+</ul>
+<h2>
+<a name="Contact_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li><p><strong>displayName</strong>: Not supported on iOS, returning <code>null</code> unless there is no <code><a href="cordova_contacts_contacts.md.html#ContactName">ContactName</a></code> specified, in which case it returns the composite name, <strong>nickname</strong> or <code>""</code>, respectively.</p></li>
+<li><p><strong>birthday</strong>: Must be input as a JavaScript <code>Date</code> object, the same way it is returned.</p></li>
+<li><p><strong>photos</strong>: Returns a <a href="cordova_file_file.md.html#File">File</a> URL to the image, which is stored in the application's temporary directory. Contents of the temporary directory are removed when the application exits.</p></li>
+<li><p><strong>categories</strong>: This property is currently not supported, returning <code>null</code>.</p></li>
+</ul>
+<h2>
+<a name="Contact_windows_phone_7_and_8_quirks">Windows Phone 7 and 8 Quirks</a>
+</h2>
+
+<ul>
+<li><p><strong>displayName</strong>: When creating a contact, the value provided for the display name parameter differs from the display name retrieved when finding the contact.</p></li>
+<li><p><strong>urls</strong>: When creating a contact, users can input and save more than one web address, but only one is available is available when searching the contact.</p></li>
+<li><p><strong>phoneNumbers</strong>: The <em>pref</em> option is not supported. The <em>type</em> is not supported in a <em>find</em> operation. Only one <code>phoneNumber</code> is allowed for each <em>type</em>.</p></li>
+<li><p><strong>emails</strong>: The <em>pref</em> option is not supported. Home and personal references same email entry. Only one entry is allowed for each <em>type</em>.</p></li>
+<li><p><strong>addresses</strong>: Supports only work, and home/personal <em>type</em>. The home and personal <em>type</em> reference the same address entry. Only one entry is allowed for each <em>type</em>.</p></li>
+<li><p><strong>organizations</strong>: Only one is allowed, and does not support the <em>pref</em>, <em>type</em>, and <em>department</em> attributes.</p></li>
+<li><p><strong>note</strong>: Not supported, returning <code>null</code>.</p></li>
+<li><p><strong>ims</strong>: Not supported, returning <code>null</code>.</p></li>
+<li><p><strong>birthdays</strong>: Not supported, returning <code>null</code>.</p></li>
+<li><p><strong>categories</strong>: Not supported, returning <code>null</code>.</p></li>
+</ul>
+<hr>
+<h1><a name="ContactAddress">ContactAddress</a></h1>
+
+<p>Contains address properties for a <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object.</p>
+
+<h2>
+<a name="ContactAddress_properties">Properties</a>
+</h2>
+
+<ul>
+<li><p><strong>pref</strong>: Set to <code>true</code> if this <code><a href="cordova_contacts_contacts.md.html#ContactAddress">ContactAddress</a></code> contains the user's preferred value. <em>(boolean)</em></p></li>
+<li><p><strong>type</strong>: A string indicating what type of field this is, <em>home</em> for example. <em>(DOMString)</em></p></li>
+<li><p><strong>formatted</strong>: The full address formatted for display. <em>(DOMString)</em></p></li>
+<li><p><strong>streetAddress</strong>: The full street address. <em>(DOMString)</em></p></li>
+<li><p><strong>locality</strong>: The city or locality. <em>(DOMString)</em></p></li>
+<li><p><strong>region</strong>: The state or region. <em>(DOMString)</em></p></li>
+<li><p><strong>postalCode</strong>: The zip code or postal code. <em>(DOMString)</em></p></li>
+<li><p><strong>country</strong>: The country name. <em>(DOMString)</em></p></li>
+</ul>
+<h2>
+<a name="ContactAddress_details">Details</a>
+</h2>
+
+<p>The <code><a href="cordova_contacts_contacts.md.html#ContactAddress">ContactAddress</a></code> object stores the properties of a single address
+of a contact. A <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object may include more than one address in
+a <code><a href="cordova_contacts_contacts.md.html#ContactAddress">ContactAddress</a>[]</code> array.</p>
+
+<h2>
+<a name="ContactAddress_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="ContactAddress_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// display the address information for all contacts
+
+function onSuccess(contacts) {
+ for (var i = 0; i < contacts.length; i++) {
+ for (var j = 0; j < contacts[i].addresses.length; j++) {
+ alert("Pref: " + contacts[i].addresses[j].pref + "\n" +
+ "Type: " + contacts[i].addresses[j].type + "\n" +
+ "Formatted: " + contacts[i].addresses[j].formatted + "\n" +
+ "Street Address: " + contacts[i].addresses[j].streetAddress + "\n" +
+ "Locality: " + contacts[i].addresses[j].locality + "\n" +
+ "Region: " + contacts[i].addresses[j].region + "\n" +
+ "Postal Code: " + contacts[i].addresses[j].postalCode + "\n" +
+ "Country: " + contacts[i].addresses[j].country);
+ }
+ }
+};
+
+function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+};
+
+// find all contacts
+var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+options.filter = "";
+var filter = ["displayName", "addresses"];
+navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(filter, onSuccess, onError, options);
+</code></pre>
+
+<h2>
+<a name="ContactAddress_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_contacts_contacts.md.html#Contact">Contact</a> Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ // find all contacts
+ var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+ options.filter = "";
+ var filter = ["displayName", "addresses"];
+ navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(filter, onSuccess, onError, options);
+ }
+
+ // onSuccess: Get a snapshot of the current contacts
+ //
+ function onSuccess(contacts) {
+ // display the address information for all contacts
+ for (var i = 0; i < contacts.length; i++) {
+ for (var j = 0; j < contacts[i].addresses.length; j++) {
+ alert("Pref: " + contacts[i].addresses[j].pref + "\n" +
+ "Type: " + contacts[i].addresses[j].type + "\n" +
+ "Formatted: " + contacts[i].addresses[j].formatted + "\n" +
+ "Street Address: " + contacts[i].addresses[j].streetAddress + "\n" +
+ "Locality: " + contacts[i].addresses[j].locality + "\n" +
+ "Region: " + contacts[i].addresses[j].region + "\n" +
+ "Postal Code: " + contacts[i].addresses[j].postalCode + "\n" +
+ "Country: " + contacts[i].addresses[j].country);
+ }
+ }
+ };
+
+ // onError: Failed to get the contacts
+ //
+ function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Find <a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></p>
+ </body>
+</html>
+</code></pre>
+
+<h2>
+<a name="ContactAddress_android_2_x_quirks">Android 2.X Quirks</a>
+</h2>
+
+<ul>
+<li>
+<strong>pref</strong>: Not supported, returning <code>false</code> on Android 2.X devices.</li>
+</ul>
+<h2>
+<a name="ContactAddress_blackberry_webworks_os_5_0_and_higher_quirks">BlackBerry WebWorks (OS 5.0 and higher) Quirks</a>
+</h2>
+
+<ul>
+<li><p><strong>pref</strong>: Not supported on BlackBerry devices, returning <code>false</code>.</p></li>
+<li><p><strong>type</strong>: Partially supported. Only one each of <em>Work</em> and <em>Home</em> type addresses can be stored per contact.</p></li>
+<li><p><strong>formatted</strong>: Partially supported. Returns a concatenation of all BlackBerry address fields.</p></li>
+<li><p><strong>streetAddress</strong>: Supported. Returns a concatenation of BlackBerry <strong>address1</strong> and <strong>address2</strong> address fields.</p></li>
+<li><p><strong>locality</strong>: Supported. Stored in BlackBerry <strong>city</strong> address field.</p></li>
+<li><p><strong>region</strong>: Supported. Stored in BlackBerry <strong>stateProvince</strong> address field.</p></li>
+<li><p><strong>postalCode</strong>: Supported. Stored in BlackBerry <strong>zipPostal</strong> address field.</p></li>
+<li><p><strong>country</strong>: Supported.</p></li>
+</ul>
+<h2>
+<a name="ContactAddress_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li><p><strong>pref</strong>: Not supported on iOS devices, returning <code>false</code>.</p></li>
+<li><p><strong>formatted</strong>: Currently not supported.</p></li>
+</ul>
+<hr>
+<h1><a name="ContactField">ContactField</a></h1>
+
+<p>Supports generic fields in a <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object. Some properties stored
+as <code><a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a></code> objects include email addresses, phone numbers, and
+URLs.</p>
+
+<h2>
+<a name="ContactField_properties">Properties</a>
+</h2>
+
+<ul>
+<li><p><strong>type</strong>: A string that indicates what type of field this is, <em>home</em> for example. <em>(DOMString)</em></p></li>
+<li><p><strong>value</strong>: The value of the field, such as a phone number or email address. <em>(DOMString)</em></p></li>
+<li><p><strong>pref</strong>: Set to <code>true</code> if this <code><a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a></code> contains the user's preferred value. <em>(boolean)</em></p></li>
+</ul>
+<h2>
+<a name="ContactField_details">Details</a>
+</h2>
+
+<p>The <code><a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a></code> object is a reusable component that represents
+contact fields generically. Each <code><a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a></code> object contains a
+<code>value</code>, <code>type</code>, and <code>pref</code> property. A <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object stores
+several properties in <code><a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>[]</code> arrays, such as phone numbers
+and email addresses.</p>
+
+<p>In most instances, there are no pre-determined values for a
+<code><a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a></code> object's <strong>type</strong> attribute. For example, a phone
+number can specify <strong>type</strong> values of <em>home</em>, <em>work</em>, <em>mobile</em>,
+<em>iPhone</em>, or any other value that is supported by a particular device
+platform's contact database. However, for the <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> <strong>photos</strong>
+field, the <strong>type</strong> field indicates the format of the returned image:
+<strong>url</strong> when the <strong>value</strong> attribute contains a URL to the photo
+image, or <em>base64</em> when the <strong>value</strong> contains a base64-encoded image
+string.</p>
+
+<h2>
+<a name="ContactField_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="ContactField_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code> // create a new contact
+ var contact = navigator.<a href="cordova_contacts_contacts.md.html#contacts.create">contacts.create</a>();
+
+ // store contact phone numbers in <a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>[]
+ var phoneNumbers = [];
+ phoneNumbers[0] = new <a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>('work', '212-555-1234', false);
+ phoneNumbers[1] = new <a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>('mobile', '917-555-5432', true); // preferred number
+ phoneNumbers[2] = new <a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>('home', '203-555-7890', false);
+ contact.phoneNumbers = phoneNumbers;
+
+ // save the contact
+ contact.save();
+</code></pre>
+
+<h2>
+<a name="ContactField_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_contacts_contacts.md.html#Contact">Contact</a> Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // device APIs are available
+ //
+
+ function onDeviceReady() {
+ // create a new contact
+ var contact = navigator.<a href="cordova_contacts_contacts.md.html#contacts.create">contacts.create</a>();
+
+ // store contact phone numbers in <a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>[]
+ var phoneNumbers = [];
+ phoneNumbers[0] = new <a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>('work', '212-555-1234', false);
+ phoneNumbers[1] = new <a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>('mobile', '917-555-5432', true); // preferred number
+ phoneNumbers[2] = new <a href="cordova_contacts_contacts.md.html#ContactField">ContactField</a>('home', '203-555-7890', false);
+ contact.phoneNumbers = phoneNumbers;
+
+ // save the contact
+ contact.save();
+
+ // search contacts, returning display name and phone numbers
+ var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+ options.filter = "";
+ filter = ["displayName", "phoneNumbers"];
+ navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(filter, onSuccess, onError, options);
+ }
+
+ // onSuccess: Get a snapshot of the current contacts
+ //
+ function onSuccess(contacts) {
+ for (var i = 0; i < contacts.length; i++) {
+ // display phone numbers
+ for (var j = 0; j < contacts[i].phoneNumbers.length; j++) {
+ alert("Type: " + contacts[i].phoneNumbers[j].type + "\n" +
+ "Value: " + contacts[i].phoneNumbers[j].value + "\n" +
+ "Preferred: " + contacts[i].phoneNumbers[j].pref);
+ }
+ }
+ };
+
+ // onError: Failed to get the contacts
+ //
+ function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Find <a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></p>
+ </body>
+</html>
+</code></pre>
+
+<h2>
+<a name="ContactField_android_quirks">Android Quirks</a>
+</h2>
+
+<ul>
+<li>
+<strong>pref</strong>: Not supported, returning <code>false</code>.</li>
+</ul>
+<h2>
+<a name="ContactField_blackberry_webworks_os_5_0_and_higher_quirks">BlackBerry WebWorks (OS 5.0 and higher) Quirks</a>
+</h2>
+
+<ul>
+<li><p><strong>type</strong>: Partially supported. Used for phone numbers.</p></li>
+<li><p><strong>value</strong>: Supported.</p></li>
+<li><p><strong>pref</strong>: Not supported, returning <code>false</code>.</p></li>
+</ul>
+<h2>
+<a name="ContactField_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li>
+<strong>pref</strong>: Not supported, returning <code>false</code>.</li>
+</ul>
+<hr>
+<h1><a name="ContactFindOptions">ContactFindOptions</a></h1>
+
+<p>Contains properties that can be used to filter the results of a <code><a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a></code> operation.</p>
+
+<h2>
+<a name="ContactFindOptions_properties">Properties</a>
+</h2>
+
+<ul>
+<li><p><strong>filter</strong>: The search string used to find contacts. <em>(DOMString)</em> (Default: <code>""</code>)</p></li>
+<li><p><strong>multiple</strong>: Determines if the find operation returns multiple contacts. <em>(Boolean)</em> (Default: <code>false</code>)</p></li>
+</ul>
+<h2>
+<a name="ContactFindOptions_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="ContactFindOptions_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// success callback
+function onSuccess(contacts) {
+ for (var i=0; i<contacts.length; i++) {
+ alert(contacts[i].displayName);
+ }
+};
+
+// error callback
+function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+};
+
+// specify contact search criteria
+var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+ options.filter=""; // empty search string returns all contacts
+ options.multiple=true; // return multiple results
+ filter = ["displayName"]; // return contact.displayName field
+
+ // find contacts
+navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(filter, onSuccess, onError, options);
+</code></pre>
+
+<h2>
+<a name="ContactFindOptions_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_contacts_contacts.md.html#Contact">Contact</a> Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ // specify contact search criteria
+ var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+ options.filter = ""; // empty search string returns all contacts
+ options.multiple = true; // return multiple results
+ filter = ["displayName"]; // return contact.displayName field
+
+ // find contacts
+ navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(filter, onSuccess, onError, options);
+ }
+
+ // onSuccess: Get a snapshot of the current contacts
+ //
+ function onSuccess(contacts) {
+ for (var i=0; i<contacts.length; i++) {
+ alert(contacts[i].displayName);
+ }
+ };
+
+ // onError: Failed to get the contacts
+ //
+ function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Find <a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></p>
+ </body>
+</html>
+</code></pre>
+
+<hr>
+<h1><a name="ContactName">ContactName</a></h1>
+
+<p>Contains different kinds of information about a <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object's name.</p>
+
+<h2>
+<a name="ContactName_properties">Properties</a>
+</h2>
+
+<ul>
+<li><p><strong>formatted</strong>: The complete name of the contact. <em>(DOMString)</em></p></li>
+<li><p><strong>familyName</strong>: The contact's family name. <em>(DOMString)</em></p></li>
+<li><p><strong>givenName</strong>: The contact's given name. <em>(DOMString)</em></p></li>
+<li><p><strong>middleName</strong>: The contact's middle name. <em>(DOMString)</em></p></li>
+<li><p><strong>honorificPrefix</strong>: The contact's prefix (example <em>Mr.</em> or <em>Dr.</em>) <em>(DOMString)</em></p></li>
+<li><p><strong>honorificSuffix</strong>: The contact's suffix (example <em>Esq.</em>). <em>(DOMString)</em></p></li>
+</ul>
+<h2>
+<a name="ContactName_details">Details</a>
+</h2>
+
+<p>The <code><a href="cordova_contacts_contacts.md.html#ContactName">ContactName</a></code> object stores a contact's name properties.</p>
+
+<h2>
+<a name="ContactName_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android 2.X</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="ContactName_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>function onSuccess(contacts) {
+ for (var i = 0; i < contacts.length; i++) {
+ alert("Formatted: " + contacts[i].name.formatted + "\n" +
+ "Family Name: " + contacts[i].name.familyName + "\n" +
+ "Given Name: " + contacts[i].name.givenName + "\n" +
+ "Middle Name: " + contacts[i].name.middleName + "\n" +
+ "Suffix: " + contacts[i].name.honorificSuffix + "\n" +
+ "Prefix: " + contacts[i].name.honorificSuffix);
+ }
+};
+
+function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+};
+
+var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+options.filter = "";
+filter = ["displayName", "name"];
+navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(filter, onSuccess, onError, options);
+</code></pre>
+
+<h2>
+<a name="ContactName_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_contacts_contacts.md.html#Contact">Contact</a> Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+ options.filter="";
+ filter = ["displayName","name"];
+ navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(filter, onSuccess, onError, options);
+ }
+
+ // onSuccess: Get a snapshot of the current contacts
+ //
+ function onSuccess(contacts) {
+ for (var i = 0; i < contacts.length; i ++) {
+ alert("Formatted: " + contacts[i].name.formatted + "\n" +
+ "Family Name: " + contacts[i].name.familyName + "\n" +
+ "Given Name: " + contacts[i].name.givenName + "\n" +
+ "Middle Name: " + contacts[i].name.middleName + "\n" +
+ "Suffix: " + contacts[i].name.honorificSuffix + "\n" +
+ "Prefix: " + contacts[i].name.honorificPrefix);
+ }
+ };
+
+ // onError: Failed to get the contacts
+ //
+ function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Find <a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></p>
+ </body>
+</html>
+</code></pre>
+
+<h2>
+<a name="ContactName_android_quirks">Android Quirks</a>
+</h2>
+
+<ul>
+<li>
+<strong>formatted</strong>: Partially supported, and read-only. Returns a concatenation of <code>honorificPrefix</code>, <code>givenName</code>, <code>middleName</code>, <code>familyName</code>, and <code>honorificSuffix</code>.</li>
+</ul>
+<h2>
+<a name="ContactName_blackberry_webworks_os_5_0_and_higher_quirks">BlackBerry WebWorks (OS 5.0 and higher) Quirks</a>
+</h2>
+
+<ul>
+<li><p><strong>formatted</strong>: Partially supported. Returns a concatenation of BlackBerry <strong>firstName</strong> and <strong>lastName</strong> fields.</p></li>
+<li><p><strong>familyName</strong>: Supported. Stored in BlackBerry <strong>lastName</strong> field.</p></li>
+<li><p><strong>givenName</strong>: Supported. Stored in BlackBerry <strong>firstName</strong> field.</p></li>
+<li><p><strong>middleName</strong>: Not supported, returning <code>null</code>.</p></li>
+<li><p><strong>honorificPrefix</strong>: Not supported, returning <code>null</code>.</p></li>
+<li><p><strong>honorificSuffix</strong>: Not supported, returning <code>null</code>.</p></li>
+</ul>
+<h2>
+<a name="ContactName_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li>
+<strong>formatted</strong>: Partially supported. Returns iOS Composite Name, but is read-only.</li>
+</ul>
+<hr>
+<h1><a name="ContactOrganization">ContactOrganization</a></h1>
+
+<p>Contains a <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object's organization properties.</p>
+
+<h2>
+<a name="ContactOrganization_properties">Properties</a>
+</h2>
+
+<ul>
+<li><p><strong>pref</strong>: Set to <code>true</code> if this <code><a href="cordova_contacts_contacts.md.html#ContactOrganization">ContactOrganization</a></code> contains the user's preferred value. <em>(boolean)</em></p></li>
+<li><p><strong>type</strong>: A string that indicates what type of field this is, <em>home</em> for example. _(DOMString)</p></li>
+<li><p><strong>name</strong>: The name of the organization. <em>(DOMString)</em></p></li>
+<li><p><strong>department</strong>: The department the contract works for. <em>(DOMString)</em></p></li>
+<li><p><strong>title</strong>: The contact's title at the organization. <em>(DOMString)</em></p></li>
+</ul>
+<h2>
+<a name="ContactOrganization_details">Details</a>
+</h2>
+
+<p>The <code><a href="cordova_contacts_contacts.md.html#ContactOrganization">ContactOrganization</a></code> object stores a contact's organization
+properties. A <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> object stores one or more
+<code><a href="cordova_contacts_contacts.md.html#ContactOrganization">ContactOrganization</a></code> objects in an array.</p>
+
+<h2>
+<a name="ContactOrganization_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="ContactOrganization_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>function onSuccess(contacts) {
+ for (var i = 0; i < contacts.length; i++) {
+ for (var j = 0; j < contacts[i].organizations.length; j++) {
+ alert("Pref: " + contacts[i].organizations[j].pref + "\n" +
+ "Type: " + contacts[i].organizations[j].type + "\n" +
+ "Name: " + contacts[i].organizations[j].name + "\n" +
+ "Department: " + contacts[i].organizations[j].department + "\n" +
+ "Title: " + contacts[i].organizations[j].title);
+ }
+ }
+};
+
+function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+};
+
+var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+options.filter = "";
+filter = ["displayName", "organizations"];
+navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(filter, onSuccess, onError, options);
+</code></pre>
+
+<h2>
+<a name="ContactOrganization_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_contacts_contacts.md.html#Contact">Contact</a> Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ var options = new <a href="cordova_contacts_contacts.md.html#ContactFindOptions">ContactFindOptions</a>();
+ options.filter="";
+ filter = ["displayName","organizations"];
+ navigator.<a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a>(filter, onSuccess, onError, options);
+ }
+
+ // onSuccess: Get a snapshot of the current contacts
+ //
+ function onSuccess(contacts) {
+ for (var i = 0; i < contacts.length; i++) {
+ for (var j = 0; j < contacts[i].organizations.length; j++) {
+ alert("Pref: " + contacts[i].organizations[j].pref + "\n" +
+ "Type: " + contacts[i].organizations[j].type + "\n" +
+ "Name: " + contacts[i].organizations[j].name + "\n" +
+ "Department: " + contacts[i].organizations[j].department + "\n" +
+ "Title: " + contacts[i].organizations[j].title);
+ }
+ }
+ };
+
+ // onError: Failed to get the contacts
+ //
+ function onError(<a href="cordova_contacts_contacts.md.html#contactError">contactError</a>) {
+ alert('onError!');
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Find <a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></p>
+ </body>
+</html>
+</code></pre>
+
+<h2>
+<a name="ContactOrganization_android_2_x_quirks">Android 2.X Quirks</a>
+</h2>
+
+<ul>
+<li>
+<strong>pref</strong>: Not supported by Android 2.X devices, returning <code>false</code>.</li>
+</ul>
+<h2>
+<a name="ContactOrganization_blackberry_webworks_os_5_0_and_higher_quirks">BlackBerry WebWorks (OS 5.0 and higher) Quirks</a>
+</h2>
+
+<ul>
+<li><p><strong>pref</strong>: Not supported by BlackBerry devices, returning <code>false</code>.</p></li>
+<li><p><strong>type</strong>: Not supported by BlackBerry devices, returning <code>null</code>.</p></li>
+<li><p><strong>name</strong>: Partially supported. The first organization name is stored in the BlackBerry <strong>company</strong> field.</p></li>
+<li><p><strong>department</strong>: Not supported, returning <code>null</code>.</p></li>
+<li><p><strong>title</strong>: Partially supported. The first organization title is stored in the BlackBerry <strong>jobTitle</strong> field.</p></li>
+</ul>
+<h2>
+<a name="ContactOrganization_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li><p><strong>pref</strong>: Not supported on iOS devices, returning <code>false</code>.</p></li>
+<li><p><strong>type</strong>: Not supported on iOS devices, returning <code>null</code>.</p></li>
+<li><p><strong>name</strong>: Partially supported. The first organization name is stored in the iOS <strong>kABPersonOrganizationProperty</strong> field.</p></li>
+<li><p><strong>department</strong>: Partially supported. The first department name is stored in the iOS <strong>kABPersonDepartmentProperty</strong> field.</p></li>
+<li><p><strong>title</strong>: Partially supported. The first title is stored in the iOS <strong>kABPersonJobTitleProperty</strong> field.</p></li>
+</ul>
+<hr>
+<h1><a name="ContactError">ContactError</a></h1>
+
+<p>A <code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a></code> object is passed to the <code><a href="cordova_contacts_contacts.md.html#contactError">contactError</a></code> callback when an error occurs.</p>
+
+<h2>
+<a name="ContactError_properties">Properties</a>
+</h2>
+
+<ul>
+<li>
+<strong>code</strong>: One of the predefined error codes listed below.</li>
+</ul>
+<h2>
+<a name="ContactError_constants">Constants</a>
+</h2>
+
+<ul>
+<li><code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a>.UNKNOWN_ERROR</code></li>
+<li><code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a>.INVALID_ARGUMENT_ERROR</code></li>
+<li><code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a>.TIMEOUT_ERROR</code></li>
+<li><code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a>.PENDING_OPERATION_ERROR</code></li>
+<li><code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a>.IO_ERROR</code></li>
+<li><code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a>.NOT_SUPPORTED_ERROR</code></li>
+<li><code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a>.PERMISSION_DENIED_ERROR</code></li>
+</ul>
+<h2>
+<a name="ContactError_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_contacts_contacts.md.html#ContactError">ContactError</a></code> object is returned to the user through the
+<code><a href="cordova_contacts_contacts.md.html#contactError">contactError</a></code> callback function when an error occurs.</p>
+
+<hr>
+<h1><a name="contactSuccess">contactSuccess</a></h1>
+
+<p>Success callback function that provides the <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> array resulting from a <code><a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a></code> operation.</p>
+
+<pre class="prettyprint"><code>function(contacts) {
+ // Do something
+}
+</code></pre>
+
+<h2>
+<a name="contactSuccess_parameters">Parameters</a>
+</h2>
+
+<ul>
+<li>
+<strong>contacts</strong>: The contact array resulting from a find operation. <em>(<a href="cordova_contacts_contacts.md.html#Contact">Contact</a>)</em>
+</li>
+</ul>
+<h2>
+<a name="contactSuccess_example">Example</a>
+</h2>
+
+<pre class="prettyprint"><code>function <a href="cordova_contacts_contacts.md.html#contactSuccess">contactSuccess</a>(contacts) {
+ for (var i=0; i<contacts.length; i++) {
+ console.log("Display Name = " + contacts[i].displayName);
+ }
+}
+</code></pre>
+
+<hr>
+<h1><a name="contactError">contactError</a></h1>
+
+<p>Error callback function for contact functions.</p>
+
+<pre class="prettyprint"><code>function(error) {
+ // Handle the error
+}
+</code></pre>
+
+<hr>
+<h1><a name="contactFields">contactFields</a></h1>
+
+<p>Required parameter for the <code><a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a></code> method, used to specify which fields should be included in the <code><a href="cordova_contacts_contacts.md.html#Contact">Contact</a></code> objects resulting from a find operation.</p>
+
+<pre class="prettyprint"><code>["name", "phoneNumbers", "emails"]
+</code></pre>
+
+<hr>
+<h1><a name="contactFindOptions">contactFindOptions</a></h1>
+
+<p>Optional parameter of the <code><a href="cordova_contacts_contacts.md.html#contacts.find">contacts.find</a></code> method, used to filter the
+contacts returned from the contacts database.</p>
+
+<pre class="prettyprint"><code>{
+ filter: "",
+ multiple: true,
+};
+</code></pre>
+
+<h2>
+<a name="contactFindOptions_options">Options</a>
+</h2>
+
+<ul>
+<li><p><strong>filter</strong>: The search string used to filter contacts. <em>(DOMString)</em> (Default: <code>""</code>)</p></li>
+<li><p><strong>multiple</strong>: Determines if the find operation returns multiple contacts. <em>(Boolean)</em> (Default: <code>false</code>)</p></li>
+</ul>
+</div>
+ </div>
+
+ <!-- Functionality and Syntax Highlighting -->
+ <script type="text/javascript" src="index.js"></script><script type="text/javascript" src="prettify/prettify.js"></script>
+</body>
+</html>