cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [3/3] git commit: updated EVERYTHING
Date Thu, 23 May 2013 00:08:07 GMT
updated EVERYTHING


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/db9f6fe6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/db9f6fe6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/db9f6fe6

Branch: refs/heads/master
Commit: db9f6fe675040007b48f00dd1462dbc86895e7fc
Parents: 40fbdc3
Author: Steven Gill <stevengill97@gmail.com>
Authored: Wed May 22 17:07:56 2013 -0700
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Wed May 22 17:07:56 2013 -0700

----------------------------------------------------------------------
 docs/Contact/contact.md                         |  238 ++
 docs/ContactAddress/contactaddress.md           |  161 ++
 docs/ContactError/contactError.md               |   45 +
 docs/ContactField/contactfield.md               |  148 +
 docs/ContactFindOptions/contactfindoptions.md   |  118 +
 docs/ContactName/contactname.md                 |  147 +
 docs/ContactOrganization/contactorganization.md |  148 +
 docs/contacts.create.md                         |   78 +
 docs/contacts.find.md                           |  119 +
 docs/contacts.md                                |  104 +
 docs/parameters/contactError.md                 |   27 +
 docs/parameters/contactFields.md                |   25 +
 docs/parameters/contactFindOptions.md           |   35 +
 docs/parameters/contactSuccess.md               |   40 +
 plugin.xml                                      |   44 +-
 test/autotest/html/HtmlReporter.js              |  101 +
 test/autotest/html/HtmlReporterHelpers.js       |   60 +
 test/autotest/html/ReporterView.js              |  164 ++
 test/autotest/html/SpecView.js                  |   79 +
 test/autotest/html/SuiteView.js                 |   22 +
 test/autotest/html/TrivialReporter.js           |  192 ++
 test/autotest/index.html                        |   59 +
 test/autotest/jasmine.css                       |   81 +
 test/autotest/jasmine.js                        | 2530 ++++++++++++++++++
 test/autotest/pages/.DS_Store                   |  Bin 0 -> 6148 bytes
 test/autotest/pages/contacts.html               |   71 +
 test/autotest/test-runner.js                    |   62 +
 test/autotest/tests/.DS_Store                   |  Bin 0 -> 6148 bytes
 test/autotest/tests/contacts.tests.js           |  472 ++++
 test/contacts/index.html                        |  134 +
 test/cordova-incl.js                            |   70 +
 test/index.html                                 |   65 +
 test/main.js                                    |  163 ++
 test/master.css                                 |  164 ++
 www/Contact.js                                  |  177 ++
 www/ContactAddress.js                           |   46 +
 www/ContactError.js                             |   42 +
 www/ContactField.js                             |   37 +
 www/ContactFindOptions.js                       |   34 +
 www/ContactName.js                              |   41 +
 www/ContactOrganization.js                      |   44 +
 www/contacts.js                                 |   76 +
 www/ios/Contact.js                              |   51 +
 www/ios/contacts.js                             |   62 +
 44 files changed, 6575 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/Contact/contact.md
----------------------------------------------------------------------
diff --git a/docs/Contact/contact.md b/docs/Contact/contact.md
new file mode 100644
index 0000000..34d96db
--- /dev/null
+++ b/docs/Contact/contact.md
@@ -0,0 +1,238 @@
+---
+license: 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.
+---
+
+Contact
+=======
+
+Contains properties that describe a contact, such as a user's personal or business contact.
+
+Properties
+----------
+
+- __id:__ A globally unique identifier. _(DOMString)_
+- __displayName:__ The name of this Contact, suitable for display to end-users. _(DOMString)_
+- __name:__ An object containing all components of a persons name. _(ContactName)_
+- __nickname:__ A casual name to address the contact by. _(DOMString)_
+- __phoneNumbers:__ An array of all the contact's phone numbers. _(ContactField[])_
+- __emails:__ An array of all the contact's email addresses. _(ContactField[])_
+- __addresses:__ An array of all the contact's addresses. _(ContactAddress[])_
+- __ims:__ An array of all the contact's IM addresses. _(ContactField[])_
+- __organizations:__ An array of all the contact's organizations. _(ContactOrganization[])_
+- __birthday:__ The birthday of the contact. _(Date)_
+- __note:__ A note about the contact. _(DOMString)_
+- __photos:__ An array of the contact's photos. _(ContactField[])_
+- __categories:__  An array of all the contacts user defined categories. _(ContactField[])_
+- __urls:__  An array of web pages associated to the contact. _(ContactField[])_
+
+Methods
+-------
+
+- __clone__: Returns a new Contact object that is a deep copy of the calling object, with the id property set to `null`. 
+- __remove__: Removes the contact from the device contacts database.  An error callback is called with a `ContactError` object if the removal is unsuccessful.
+- __save__: Saves a new contact to the device contacts database, or updates an existing contact if a contact with the same __id__ already exists.
+
+
+Details
+-------
+
+The `Contact` object represents a user contact.  Contacts can be created, saved to, or removed from the device contacts database.  Contacts can also be retrieved (individually or in bulk) from the database by invoking the `contacts.find` method.
+
+_Note: Not all of the above contact fields are supported on every device platform.  Please check each platform's Quirks section for information about which fields are supported._
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Bada 1.2 & 2.0
+- Windows 8
+
+Save Quick Example
+------------------
+
+	function onSuccess(contact) {
+		alert("Save Success");
+	};
+
+	function onError(contactError) {
+		alert("Error = " + contactError.code);
+	};
+
+	// create a new contact object
+    var contact = navigator.contacts.create();
+	contact.displayName = "Plumber";
+	contact.nickname = "Plumber"; 		//specify both to support all devices
+	
+	// populate some fields
+	var name = new ContactName();
+	name.givenName = "Jane";
+	name.familyName = "Doe";
+	contact.name = name;
+	
+	// save to device
+	contact.save(onSuccess,onError);
+
+Clone Quick Example
+-------------------
+
+	// 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); 
+
+Remove Quick Example
+--------------------
+
+    function onSuccess() {
+        alert("Removal Success");
+    };
+
+    function onError(contactError) {
+        alert("Error = " + contactError.code);
+    };
+
+	// remove the contact from the device
+	contact.remove(onSuccess,onError);
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Contact Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+		    // create
+		    var contact = navigator.contacts.create();
+			contact.displayName = "Plumber";
+			contact.nickname = "Plumber"; 		//specify both to support all devices
+			var name = new ContactName();
+			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(contactError) {
+			alert("Error = " + contactError.code);
+        }
+        
+        // onRemoveSuccess: Get a snapshot of the current contacts
+        //
+        function onRemoveSuccess(contacts) {
+			alert("Removal Success");
+        }
+    
+        // onRemoveError: Failed to get the contacts
+        //
+        function onRemoveError(contactError) {
+			alert("Error = " + contactError.code);
+        }
+
+        </script>
+      </head>
+      <body>
+        <h1>Example</h1>
+        <p>Find Contacts</p>
+      </body>
+    </html>
+
+Android 2.X Quirks
+------------------
+
+- __categories:__  This property is not support by Android 2.X devices, and will always be returned as `null`.
+
+
+BlackBerry WebWorks (OS 5.0 and higher) Quirks
+---------------------------------------------
+
+- __id:__ Supported.  Assigned by device when contact is saved.
+- __displayName:__ Supported.  Stored in BlackBerry __user1__ field.
+- __nickname:__ This property is not supported, and will always be returned as `null`. 
+- __phoneNumbers:__ Partially supported.  Phone numbers will be stored in BlackBerry fields __homePhone1__ and __homePhone2__ if _type_ is 'home', __workPhone1__ and __workPhone2__ if _type_ is 'work', __mobilePhone__ if _type_ is 'mobile', __faxPhone__ if _type_ is 'fax', __pagerPhone__ if _type_ is 'pager', and __otherPhone__ if _type_ is none of the above.
+- __emails:__ Partially supported.  The first three email addresses will be stored in the BlackBerry __email1__, __email2__, and __email3__ fields, respectively.
+- __addresses:__ Partially supported.  The first and second addresses will be stored in the BlackBerry __homeAddress__ and __workAddress__ fields, respectively.
+- __ims:__ This property is not supported, and will always be returned as `null`. 
+- __organizations:__ Partially supported.  The __name__ and __title__ of the first organization are stored in the BlackBerry __company__ and __title__ fields, respectively.
+- __photos:__ - 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 will be scaled down before saving to the BlackBerry contacts database.   The contact photo is returned as a Base64 encoded image.
+- __categories:__  Partially supported.  Only 'Business' and 'Personal' categories are supported. 
+- __urls:__  Partially supported. The first url is stored in BlackBerry __webpage__ field.
+
+iOS Quirks
+----------
+- __displayName:__ This property is not supported by iOS and will be returned as `null` unless there is no ContactName specified.  If there is no ContactName, then composite name, __nickname__ or "" is returned for __displayName__, respectively. 
+- __birthday:__ For input, this property must be provided as a JavaScript Date object. It is returned as a JavaScript Date object.
+- __photos:__ Returned Photo is stored in the application's temporary directory and a File URL to photo is returned.  Contents of temporary folder is deleted when application exits. 
+- __categories:__  This property is not currently supported and will always be returned as `null`.
+
+Windows Phone 7 and 8 Quirks
+-----------
+
+- __displayName:__ When creating a contact, the value provided for the display name parameter differs from the display name retrieved when finding the contact. 
+- __urls:__ When creating a contact, user inputs multiple web addresses in the url field and saves the contact. While pulling the information during the contact search url field do not show up multiple web addresses
+- __phoneNumbers:__ _pref_ is not supported, _type_ is not supported in a _find_ operation, only supports one phoneNumber of each _type_
+- __emails:__ _pref_ is not supported, home and personal points to same email entry, supports only one entry for each _type_
+- __addresses:__ supports only _type_ of work, home/personal, _type_ home and personal points to same address entry, supports only one entry for each _type_
+- __organizations:__ Multiple _organizations_ are not supported, does not support the attributes: _pref_, _type_, _department_
+- __note:__ This property is not supported, and will always be returned as `null`. 
+- __ims:__ This property is not supported, and will always be returned as `null`. 
+- __birthdays:__ This property is not supported, and will always be returned as `null`. 
+- __categories:__ This property is not supported, and will always be returned as `null`. 
+
+
+Bada Quirks
+-----------
+
+- __displayName:__ This property is not supported
+- __birthday:__ This property is not supported
+- __photos:__ This property should be a list with one URL to a photo
+- __categories:__ This property is not supported
+- __ims:__ This property is not supported

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/ContactAddress/contactaddress.md
----------------------------------------------------------------------
diff --git a/docs/ContactAddress/contactaddress.md b/docs/ContactAddress/contactaddress.md
new file mode 100644
index 0000000..937e9de
--- /dev/null
+++ b/docs/ContactAddress/contactaddress.md
@@ -0,0 +1,161 @@
+---
+license: 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.
+---
+
+ContactAddress
+==============
+
+Contains address properties for a `Contact` object.
+
+Properties
+----------
+- __pref:__ Set to `true` if this `ContactAddress` contains the user's preferred value. _(boolean)_
+- __type:__ A string that tells you what type of field this is (example: 'home'). _(DOMString)
+- __formatted:__ The full address formatted for display. _(DOMString)_
+- __streetAddress:__ The full street address. _(DOMString)_
+- __locality:__ The city or locality. _(DOMString)_
+- __region:__ The state or region. _(DOMString)_
+- __postalCode:__ The zip code or postal code. _(DOMString)_
+- __country:__ The country name. _(DOMString)_
+
+Details
+-------
+
+The `ContactAddress` object stores the properties of a single address of a contact.  A `Contact` object can have one or more addresses in a  `ContactAddress[]` array. 
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Bada 1.2 & 2.0
+- Windows Phone 7 and 8
+- Windows 8
+
+Quick Example
+-------------
+
+	// 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(contactError) {
+        alert('onError!');
+    };
+
+    // find all contacts
+    var options = new ContactFindOptions();
+	options.filter=""; 
+	var filter = ["displayName","addresses"];
+    navigator.contacts.find(filter, onSuccess, onError, options);
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Contact Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+		    // find all contacts
+		    var options = new ContactFindOptions();
+			options.filter=""; 
+			var filter = ["displayName","addresses"];
+		    navigator.contacts.find(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(contactError) {
+            alert('onError!');
+        }
+
+        </script>
+      </head>
+      <body>
+        <h1>Example</h1>
+        <p>Find Contacts</p>
+      </body>
+    </html>
+
+Android 2.X Quirks
+------------------
+
+- __pref:__ This property is not supported by Android 2.X devices and will always return `false`.
+
+BlackBerry WebWorks (OS 5.0 and higher) Quirks
+--------------------------------------------
+- __pref:__ This property is not supported on Blackberry devices and will always return `false`.
+- __type:__ Partially supported.  Only one each of "Work" and "Home" type addresses can be stored per contact. 
+- __formatted:__ Partially supported.  Will return concatenation of all BlackBerry address fields.
+- __streetAddress:__ Supported.  Will return concatenation of BlackBerry __address1__ and __address2__ address fields. 
+- __locality:__ Supported.  Stored in BlackBerry __city__ address field.
+- __region:__ Supported.  Stored in BlackBerry __stateProvince__ address field.
+- __postalCode:__ Supported.  Stored in BlackBerry __zipPostal__ address field.
+- __country:__ Supported.
+
+iOS Quirks
+----------
+- __pref:__ This property is not supported on iOS devices and will always return `false`.
+- __formatted:__ Not currently supported.
+
+Bada Quirks
+-----------
+- __formatted:__ This property is not supported
+- __type:__ Has to be one of the following: WORK, HOME

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/ContactError/contactError.md
----------------------------------------------------------------------
diff --git a/docs/ContactError/contactError.md b/docs/ContactError/contactError.md
new file mode 100644
index 0000000..45b5873
--- /dev/null
+++ b/docs/ContactError/contactError.md
@@ -0,0 +1,45 @@
+---
+license: 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.
+---
+
+ContactError
+========
+
+A `ContactError` object is returned to the `contactError` callback when an error occurs.
+
+Properties
+----------
+
+- __code:__ One of the predefined error codes listed below.
+
+Constants
+---------
+
+- `ContactError.UNKNOWN_ERROR`
+- `ContactError.INVALID_ARGUMENT_ERROR`
+- `ContactError.TIMEOUT_ERROR`
+- `ContactError.PENDING_OPERATION_ERROR`
+- `ContactError.IO_ERROR`
+- `ContactError.NOT_SUPPORTED_ERROR`
+- `ContactError.PERMISSION_DENIED_ERROR`
+
+Description
+-----------
+
+The `ContactError` object is returned to the user through the `contactError` callback function when an error occurs.
+

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/ContactField/contactfield.md
----------------------------------------------------------------------
diff --git a/docs/ContactField/contactfield.md b/docs/ContactField/contactfield.md
new file mode 100644
index 0000000..f85a704
--- /dev/null
+++ b/docs/ContactField/contactfield.md
@@ -0,0 +1,148 @@
+---
+license: 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.
+---
+
+ContactField
+============
+
+Supports generic fields in a `Contact` object.  Some properties that are stored as `ContactField` objects include email addresses, phone numbers, and urls.
+
+Properties
+----------
+
+- __type:__ A string that tells you what type of field this is (example: 'home'). _(DOMString)_
+- __value:__ The value of the field (such as a phone number or email address). _(DOMString)_
+- __pref:__ Set to `true` if this `ContactField` contains the user's preferred value. _(boolean)_
+
+Details
+-------
+
+The `ContactField` object is a reusable component that is used to support contact fields in a generic fashion.  Each `ContactField` object contains a value property, a type property, and a pref property.  A `Contact` object stores several properties in `ContactField[]` arrays, such as phone numbers and email addresses.
+
+In most instances, there are no pre-determined values for the __type__ attribute of a `ContactField` object.  For example, a phone number can have __type__ values of 'home', 'work', 'mobile', 'iPhone', or any other value that is supported by the contact database on a particular device platform.  However, in the case of the `Contact` __photos__ field, Cordova makes use of the __type__ field to indicate the format of the returned image.  Cordova will return __type: 'url'__ when the __value__ attribute contains a URL to the photo image, or __type: 'base64'__ when the returned __value__ attribute contains a Base64 encoded image string.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Bada 1.2 & 2.0
+- Windows Phone 7 and 8
+- Windows 8
+
+Quick Example
+-------------
+
+	// create a new contact
+	var contact = navigator.contacts.create();
+	
+	// store contact phone numbers in ContactField[]
+	var phoneNumbers = [];
+	phoneNumbers[0] = new ContactField('work', '212-555-1234', false);
+	phoneNumbers[1] = new ContactField('mobile', '917-555-5432', true); // preferred number
+	phoneNumbers[2] = new ContactField('home', '203-555-7890', false);
+	contact.phoneNumbers = phoneNumbers;
+	
+	// save the contact
+	contact.save();
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Contact Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+			// create a new contact
+			var contact = navigator.contacts.create();
+
+			// store contact phone numbers in ContactField[]
+			var phoneNumbers = [];
+			phoneNumbers[0] = new ContactField('work', '212-555-1234', false);
+			phoneNumbers[1] = new ContactField('mobile', '917-555-5432', true); // preferred number
+			phoneNumbers[2] = new ContactField('home', '203-555-7890', false);
+			contact.phoneNumbers = phoneNumbers;
+
+			// save the contact
+			contact.save();
+
+			// search contacts, returning display name and phone numbers
+			var options = new ContactFindOptions();
+			options.filter="";
+			filter = ["displayName","phoneNumbers"];
+			navigator.contacts.find(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(contactError) {
+            alert('onError!');
+        }
+
+        </script>
+      </head>
+      <body>
+        <h1>Example</h1>
+        <p>Find Contacts</p>
+      </body>
+    </html>
+
+Android Quirks
+--------------
+
+- __pref:__ This property is not support by Android devices, and will always return `false`.
+
+BlackBerry WebWorks (OS 5.0 and higher) Quirks
+--------------------------------------------
+
+- __type:__ Partially supported.  Used for phone numbers.
+- __value:__ Supported.
+- __pref:__ This property is not supported, and will always return `false`.
+
+iOS Quirks
+-----------
+- __pref:__ This property is not supported on iOS devices and will always return `false`.
+
+Bada Quirks
+-----------
+- __type:__ Property has to be one of the following for Email or Address fields: "WORK", "HOME". Property has to be one of the following for Phone fields: "WORK", "HOME", "VOICE", "FAX", "MSG", "CELL", "PAGER","BBS", "MODEM", "CAR", "ISDN","VIDEO", "PCS"

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/ContactFindOptions/contactfindoptions.md
----------------------------------------------------------------------
diff --git a/docs/ContactFindOptions/contactfindoptions.md b/docs/ContactFindOptions/contactfindoptions.md
new file mode 100644
index 0000000..4acf254
--- /dev/null
+++ b/docs/ContactFindOptions/contactfindoptions.md
@@ -0,0 +1,118 @@
+---
+license: 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.
+---
+
+ContactFindOptions
+==================
+
+Contains properties that can be used to filter the results of a `contacts.find` operation.
+
+Properties
+----------
+
+- __filter:__ The search string used to find contacts. _(DOMString)_ (Default: "")
+- __multiple:__ Determines if the find operation should return multiple contacts. _(Boolean)_ (Default: false)
+
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Bada 1.2 & 2.0
+- Windows Phone 7 and 8
+- Windows 8
+
+Quick Example
+-------------
+
+	// success callback
+    function onSuccess(contacts) {
+		for (var i=0; i<contacts.length; i++) {
+			alert(contacts[i].displayName);
+		}
+    };
+
+	// error callback
+    function onError(contactError) {
+        alert('onError!');
+    };
+
+	// specify contact search criteria
+    var options = new ContactFindOptions();
+	options.filter="";			// empty search string returns all contacts
+	options.multiple=true;		// return multiple results
+	filter = ["displayName"];	// return contact.displayName field
+	
+	// find contacts
+    navigator.contacts.find(filter, onSuccess, onError, options);
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Contact Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+			// specify contact search criteria
+		    var options = new ContactFindOptions();
+			options.filter="";			// empty search string returns all contacts
+			options.multiple=true;		// return multiple results
+			filter = ["displayName"];	// return contact.displayName field
+
+			// find contacts
+		    navigator.contacts.find(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(contactError) {
+            alert('onError!');
+        }
+
+        </script>
+      </head>
+      <body>
+        <h1>Example</h1>
+        <p>Find Contacts</p>
+      </body>
+    </html>
+
+Bada Quirks
+-----------
+__filter:__ Property can only apply to the following: "firstName", "lastName", "nickname", "phoneNumber", "email", "address"

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/ContactName/contactname.md
----------------------------------------------------------------------
diff --git a/docs/ContactName/contactname.md b/docs/ContactName/contactname.md
new file mode 100644
index 0000000..91915fb
--- /dev/null
+++ b/docs/ContactName/contactname.md
@@ -0,0 +1,147 @@
+---
+license: 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.
+---
+
+ContactName
+===========
+
+Contains name properties of a `Contact` object.
+
+Properties
+----------
+
+- __formatted:__ The complete name of the contact. _(DOMString)_
+- __familyName:__ The contacts family name. _(DOMString)_
+- __givenName:__ The contacts given name. _(DOMString)_
+- __middleName:__ The contacts middle name. _(DOMString)_
+- __honorificPrefix:__ The contacts prefix (example Mr. or Dr.) _(DOMString)_
+- __honorificSuffix:__ The contacts suffix (example Esq.). _(DOMString)_
+
+Details
+-------
+
+The `ContactName` object stores name properties of a contact.
+
+Supported Platforms
+-------------------
+
+- Android 2.X
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Bada 1.2 & 2.0
+- Windows Phone 7 and 8
+- Windows 8
+
+Quick Example
+-------------
+
+    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(contactError) {
+        alert('onError!');
+    };
+
+    var options = new ContactFindOptions();
+	options.filter="";
+	filter = ["displayName","name"];
+    navigator.contacts.find(filter, onSuccess, onError, options);
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Contact Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+			var options = new ContactFindOptions();
+			options.filter="";
+			filter = ["displayName","name"];
+			navigator.contacts.find(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(contactError) {
+            alert('onError!');
+        }
+
+        </script>
+      </head>
+      <body>
+        <h1>Example</h1>
+        <p>Find Contacts</p>
+      </body>
+    </html>
+
+Android Quirks
+------------
+- __formatted:__ Partially supported.  Will return the concatenation of honorificPrefix, givenName, middleName, familyName and honorificSuffix but will not store.
+
+BlackBerry WebWorks (OS 5.0 and higher) Quirks
+---------------------------------------------
+
+- __formatted:__ Partially supported.  Will return concatenation of BlackBerry __firstName__ and __lastName__ fields.
+- __familyName:__ Supported.  Stored in BlackBerry __lastName__ field.
+- __givenName:__ Supported.  Stored in BlackBerry __firstName__ field.
+- __middleName:__ This property is not supported, and will always return `null`.
+- __honorificPrefix:__ This property is not supported, and will always return `null`.
+- __honorificSuffix:__ This property is not supported, and will always return `null`.
+
+iOS Quirks
+------------
+- __formatted:__ Partially supported.  Will return iOS Composite Name but will not store.
+
+Bada Quirks
+-----------
+- __formatted:__ Property not supported
+- __middleName:__ Property not supported
+_ __honorificPrefix:__ Property not supported
+- __honorificSuffix:__ Property not supported

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/ContactOrganization/contactorganization.md
----------------------------------------------------------------------
diff --git a/docs/ContactOrganization/contactorganization.md b/docs/ContactOrganization/contactorganization.md
new file mode 100644
index 0000000..aef1248
--- /dev/null
+++ b/docs/ContactOrganization/contactorganization.md
@@ -0,0 +1,148 @@
+---
+license: 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.
+---
+
+ContactOrganization
+===================
+
+Contains organization properties of a `Contact` object.
+
+Properties
+----------
+- __pref:__ Set to `true` if this `ContactOrganization` contains the user's preferred value. _(boolean)_
+- __type:__ A string that tells you what type of field this is (example: 'home'). _(DOMString)
+- __name:__ The name of the organization. _(DOMString)_
+- __department:__ The department the contract works for. _(DOMString)_
+- __title:__ The contacts title at the organization. _(DOMString)_
+
+Details
+-------
+
+The `ContactOrganization` object stores a contact's organization properties.  A `Contact` object stores one or more `ContactOrganization` objects in an array. 
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Bada 1.2
+- Windows Phone 7 and 8
+- Windows 8
+
+Quick Example
+-------------
+
+    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(contactError) {
+        alert('onError!');
+    };
+
+    var options = new ContactFindOptions();
+	options.filter="";
+	filter = ["displayName","organizations"];
+    navigator.contacts.find(filter, onSuccess, onError, options);
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Contact Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+			var options = new ContactFindOptions();
+			options.filter="";
+			filter = ["displayName","organizations"];
+			navigator.contacts.find(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(contactError) {
+            alert('onError!');
+        }
+
+        </script>
+      </head>
+      <body>
+        <h1>Example</h1>
+        <p>Find Contacts</p>
+      </body>
+    </html>
+	
+
+Android 2.X Quirks
+------------------
+
+- __pref:__ This property is not supported by Android 2.X devices and will always return `false`.
+
+BlackBerry WebWorks (OS 5.0 and higher) Quirks
+--------------------------------------------
+- __pref:__ This property is not supported by Blackberry devices and will always return `false`.
+- __type:__ This property is not supported by Blackberry devices and will always return `null`.
+- __name:__ Partially supported.  The first organization name will be stored in the BlackBerry __company__ field.
+- __department:__ This property is not supported, and will always be returned as `null`.
+- __title:__ Partially supported.  The first organization title will be stored in the BlackBerry __jobTitle__ field.
+
+iOS Quirks
+-----------
+- __pref:__ This property is not supported on iOS devices and will always return `false`.
+- __type:__ This property is not supported on iOS devices and will always return `null`.
+- __name:__ Partially supported.  The first organization name will be stored in the iOS __kABPersonOrganizationProperty__ field.
+- __department__: Partially supported.  The first department name will be stored in the iOS __kABPersonDepartmentProperty__ field.
+- __title__: Partially supported.  The first title will be stored in the iOS __kABPersonJobTitleProperty__ field.
+
+Bada 2.0 Quirks
+---------------
+- ContactOrganization not supported

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/contacts.create.md
----------------------------------------------------------------------
diff --git a/docs/contacts.create.md b/docs/contacts.create.md
new file mode 100644
index 0000000..42e8cb3
--- /dev/null
+++ b/docs/contacts.create.md
@@ -0,0 +1,78 @@
+---
+license: 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.
+---
+
+contacts.create
+===============
+
+Returns a new Contact object.
+
+    var contact = navigator.contacts.create(properties);
+
+Description
+-----------
+
+contacts.create is a synchronous function that returns a new `Contact` object.
+
+This method does not persist the Contact object to the device contacts database.  To persist the Contact object to the device, invoke the `Contact.save` method.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Bada 1.2 & 2.0
+
+Quick Example
+-------------
+
+    var myContact = navigator.contacts.create({"displayName": "Test User"});
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Contact Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+			var myContact = navigator.contacts.create({"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 Contact</p>
+      </body>
+    </html>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/contacts.find.md
----------------------------------------------------------------------
diff --git a/docs/contacts.find.md b/docs/contacts.find.md
new file mode 100644
index 0000000..ad97108
--- /dev/null
+++ b/docs/contacts.find.md
@@ -0,0 +1,119 @@
+---
+license: 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.
+---
+
+contacts.find
+=============
+
+Queries the device contacts database and returns one or more `Contact` objects, each containing the fields specified.
+
+    navigator.contacts.find(contactFields, contactSuccess, contactError, contactFindOptions);
+
+Description
+-----------
+
+contacts.find is an asynchronous function that queries the device contacts database and returns an array of `Contact` objects.  The resulting objects are passed to the `contactSuccess` callback function specified by the __contactSuccess__ parameter.  
+
+Users must specify the contact fields to be used as a search qualifier in the __contactFields__ parameter.  Only the fields specified in the __contactFields__ parameter will be returned as properties of the `Contact` objects that are passed to the __contactSuccess__ callback function.  A zero-length __contactFields__ parameter is invalid and will result in a `ContactError.INVALID_ARGUMENT_ERROR` . A __contactFields__ value of ["*"] will return all contact fields. 
+
+The __contactFindOptions.filter__ 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 __contactFields__ parameter.  If a match is found in a comparison with _any_ of the specified fields, the contact is returned.
+
+Parameters
+----------
+
+- __contactFields:__ Contact fields to be used as search qualifier. Only these fields will have values in the resulting `Contact` objects. _(DOMString[])_ [Required]
+- __contactSuccess:__ Success callback function that is invoked with the contacts returned from the contacts database. [Required]
+- __contactError:__ Error callback function. Invoked when error occurs. [Optional]
+- __contactFindOptions:__ Search options to filter contacts. [Optional]
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Bada 1.2 & 2.0
+- Windows 8
+
+Quick Example
+-------------
+
+    function onSuccess(contacts) {
+        alert('Found ' + contacts.length + ' contacts.');
+    };
+
+    function onError(contactError) {
+        alert('onError!');
+    };
+
+    // find all contacts with 'Bob' in any name field
+    var options = new ContactFindOptions();
+	options.filter="Bob";
+	options.multiple=true; 
+	var fields = ["displayName", "name"];
+    navigator.contacts.find(fields, onSuccess, onError, options);
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Contact Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for Cordova to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+		    // find all contacts with 'Bob' in any name field
+		    var options = new ContactFindOptions();
+			options.filter="Bob"; 
+			var fields = ["displayName", "name"];
+		    navigator.contacts.find(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(contactError) {
+            alert('onError!');
+        }
+
+        </script>
+      </head>
+      <body>
+        <h1>Example</h1>
+        <p>Find Contacts</p>
+      </body>
+    </html>
+    
+

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/contacts.md
----------------------------------------------------------------------
diff --git a/docs/contacts.md b/docs/contacts.md
new file mode 100644
index 0000000..28e3e5e
--- /dev/null
+++ b/docs/contacts.md
@@ -0,0 +1,104 @@
+---
+license: 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.
+---
+
+Contacts
+========
+
+> The `contacts` object provides access to the device contacts database.
+
+Methods
+-------
+
+- contacts.create
+- contacts.find
+
+Arguments
+---------
+
+- contactFields
+- contactSuccess
+- contactError
+- contactFindOptions
+
+Objects
+-------
+
+- Contact
+- ContactName
+- ContactField
+- ContactAddress
+- ContactOrganization
+- ContactFindOptions
+- ContactError
+
+Permissions
+-----------
+
+### Android
+
+#### app/res/xml/config.xml
+
+    <plugin name="Contacts" value="org.apache.cordova.ContactManager" />
+
+#### 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" />
+
+### Bada
+
+#### manifest.xml
+
+    <Privilege>
+        <Name>ADDRESSBOOK</Name>
+    </Privilege>
+
+### BlackBerry WebWorks
+
+#### www/plugins.xml
+
+    <plugin name="Contact" value="org.apache.cordova.pim.Contact" />
+
+#### 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.Contact" required="true" version="1.0.0.0" />
+
+### iOS
+
+#### config.xml
+
+    <plugin name="Contacts" value="CDVContacts" />
+
+### webOS
+
+    No permissions are required.
+
+### Windows Phone
+
+#### Properties/WPAppManifest.xml
+
+    <Capabilities>
+        <Capability Name="ID_CAP_CONTACTS" />
+    </Capabilities>
+
+Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/parameters/contactError.md
----------------------------------------------------------------------
diff --git a/docs/parameters/contactError.md b/docs/parameters/contactError.md
new file mode 100644
index 0000000..6b50ddc
--- /dev/null
+++ b/docs/parameters/contactError.md
@@ -0,0 +1,27 @@
+---
+license: 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.
+---
+
+contactError
+============
+
+Error callback function for contact functions.
+
+    function(error) {
+        // Handle the error
+    }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/parameters/contactFields.md
----------------------------------------------------------------------
diff --git a/docs/parameters/contactFields.md b/docs/parameters/contactFields.md
new file mode 100644
index 0000000..66c9d3d
--- /dev/null
+++ b/docs/parameters/contactFields.md
@@ -0,0 +1,25 @@
+---
+license: 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.
+---
+
+contactFields
+=============
+
+Required parameter of the `contacts.find` method.  Use this parameter to specify which fields should be included in the `Contact` objects resulting from a find operation.
+
+    ["name", "phoneNumbers", "emails"]

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/parameters/contactFindOptions.md
----------------------------------------------------------------------
diff --git a/docs/parameters/contactFindOptions.md b/docs/parameters/contactFindOptions.md
new file mode 100644
index 0000000..2eb9afc
--- /dev/null
+++ b/docs/parameters/contactFindOptions.md
@@ -0,0 +1,35 @@
+---
+license: 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.
+---
+
+contactFindOptions
+==================
+
+Optional parameter of the `contacts.find` method.  Use this parameter to filter the contacts returned from the contacts database.
+
+    { 
+		filter: "",
+		multiple: true,
+	};
+
+Options
+-------
+
+- __filter:__ The search string used to filter contacts. _(DOMString)_ (Default: "")
+- __multiple:__ Determines if the find operation should return multiple contacts. _(Boolean)_ (Default: false)
+

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/docs/parameters/contactSuccess.md
----------------------------------------------------------------------
diff --git a/docs/parameters/contactSuccess.md b/docs/parameters/contactSuccess.md
new file mode 100644
index 0000000..9068218
--- /dev/null
+++ b/docs/parameters/contactSuccess.md
@@ -0,0 +1,40 @@
+---
+license: 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.
+---
+
+contactSuccess
+==============
+
+Success callback function that provides the `Contact` array resulting from a `contacts.find` operation.
+
+    function(contacts) {
+        // Do something
+    }
+
+Parameters
+----------
+
+- __contacts:__ The contact array resulting from a find operation. (`Contact`)
+
+Example
+-------
+
+    function contactSuccess(contacts) {
+		for (var i=0; i<contacts.length; i++) {
+			console.log("Display Name = " + contacts[i].displayName;
+    }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 8754023..8793d0c 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -5,6 +5,40 @@ xmlns:android="http://schemas.android.com/apk/res/android"
 id="org.apache.cordova.core.contacts">
     version="0.1.0">
     <name>Contacts</name>
+    
+    <js-module src="www/contacts.js" name="contacts">
+        <clobbers target="navigator.contacts" />
+    </js-module>
+
+    <js-module src="www/Contact.js" name="Contact">
+        <clobbers target="Contact" />
+    </js-module>
+
+    <js-module src="www/ContactAddress.js" name="ContactAddress">
+        <clobbers target="ContactAddress" />
+    </js-module>
+
+    <js-module src="www/ContactError.js" name="ContactError">
+        <clobbers target="ContactError" />
+    </js-module>
+
+    <js-module src="www/ContactField.js" name="ContactField">
+        <clobbers target="ContactField" />
+    </js-module>
+
+    <js-module src="www/ContactFindOptions.js" name="ContactFindOptions">
+        <clobbers target="ContactFindOptions" />
+    </js-module>
+
+    <js-module src="www/ContactName.js" name="ContactName">
+        <clobbers target="ContactName" />
+    </js-module>
+
+    <js-module src="www/ContactOrganization.js" name="ContactOrganization">
+        <clobbers target="ContactOrganization" />
+    </js-module>
+
+
 
     <!-- android -->
     <platform name="android">
@@ -26,7 +60,15 @@ id="org.apache.cordova.core.contacts">
                 <param name="ios-package" value="CDVContacts"/>
             </feature>
         </config-file>
-            
+        
+        <js-module src="www/ios/contacts.js" name="contacts">
+            <merges target="navigator.contacts" />
+        </js-module>
+
+        <js-module src="www/ios/Contact.js" name="Contact">
+            <merges target="Contact" />
+        </js-module>
+   
         <header-file src="src/ios/CDVContacts.h" />
         <source-file src="src/ios/CDVContacts.m" />
         <header-file src="src/ios/CDVContact.h" />

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/test/autotest/html/HtmlReporter.js
----------------------------------------------------------------------
diff --git a/test/autotest/html/HtmlReporter.js b/test/autotest/html/HtmlReporter.js
new file mode 100644
index 0000000..7d9d924
--- /dev/null
+++ b/test/autotest/html/HtmlReporter.js
@@ -0,0 +1,101 @@
+jasmine.HtmlReporter = function(_doc) {
+  var self = this;
+  var doc = _doc || window.document;
+
+  var reporterView;
+
+  var dom = {};
+
+  // Jasmine Reporter Public Interface
+  self.logRunningSpecs = false;
+
+  self.reportRunnerStarting = function(runner) {
+    var specs = runner.specs() || [];
+
+    if (specs.length == 0) {
+      return;
+    }
+
+    createReporterDom(runner.env.versionString());
+    doc.body.appendChild(dom.reporter);
+
+    reporterView = new jasmine.HtmlReporter.ReporterView(dom);
+    reporterView.addSpecs(specs, self.specFilter);
+  };
+
+  self.reportRunnerResults = function(runner) {
+    reporterView && reporterView.complete();
+  };
+
+  self.reportSuiteResults = function(suite) {
+    reporterView.suiteComplete(suite);
+  };
+
+  self.reportSpecStarting = function(spec) {
+    if (self.logRunningSpecs) {
+      self.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
+    }
+  };
+
+  self.reportSpecResults = function(spec) {
+    reporterView.specComplete(spec);
+  };
+
+  self.log = function() {
+    var console = jasmine.getGlobal().console;
+    if (console && console.log) {
+      if (console.log.apply) {
+        console.log.apply(console, arguments);
+      } else {
+        console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
+      }
+    }
+  };
+
+  self.specFilter = function(spec) {
+    if (!focusedSpecName()) {
+      return true;
+    }
+
+    return spec.getFullName().indexOf(focusedSpecName()) === 0;
+  };
+
+  return self;
+
+  function focusedSpecName() {
+    var specName;
+
+    (function memoizeFocusedSpec() {
+      if (specName) {
+        return;
+      }
+
+      var paramMap = [];
+      var params = doc.location.search.substring(1).split('&');
+
+      for (var i = 0; i < params.length; i++) {
+        var p = params[i].split('=');
+        paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
+      }
+
+      specName = paramMap.spec;
+    })();
+
+    return specName;
+  }
+
+  function createReporterDom(version) {
+    dom.reporter = self.createDom('div', { id: 'HTMLReporter', className: 'jasmine_reporter' },
+      dom.banner = self.createDom('div', { className: 'banner' },
+        self.createDom('span', { className: 'title' }, "Jasmine "),
+        self.createDom('span', { className: 'version' }, version)),
+
+      dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
+      dom.alert = self.createDom('div', {className: 'alert'}),
+      dom.results = self.createDom('div', {className: 'results'},
+        dom.summary = self.createDom('div', { className: 'summary' }),
+        dom.details = self.createDom('div', { id: 'details' }))
+    );
+  }
+};
+jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter);

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/test/autotest/html/HtmlReporterHelpers.js
----------------------------------------------------------------------
diff --git a/test/autotest/html/HtmlReporterHelpers.js b/test/autotest/html/HtmlReporterHelpers.js
new file mode 100644
index 0000000..745e1e0
--- /dev/null
+++ b/test/autotest/html/HtmlReporterHelpers.js
@@ -0,0 +1,60 @@
+jasmine.HtmlReporterHelpers = {};
+
+jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
+  var el = document.createElement(type);
+
+  for (var i = 2; i < arguments.length; i++) {
+    var child = arguments[i];
+
+    if (typeof child === 'string') {
+      el.appendChild(document.createTextNode(child));
+    } else {
+      if (child) {
+        el.appendChild(child);
+      }
+    }
+  }
+
+  for (var attr in attrs) {
+    if (attr == "className") {
+      el[attr] = attrs[attr];
+    } else {
+      el.setAttribute(attr, attrs[attr]);
+    }
+  }
+
+  return el;
+};
+
+jasmine.HtmlReporterHelpers.getSpecStatus = function(child) {
+  var results = child.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.skipped) {
+    status = 'skipped';
+  }
+
+  return status;
+};
+
+jasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) {
+  var parentDiv = this.dom.summary;
+  var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite';
+  var parent = child[parentSuite];
+
+  if (parent) {
+    if (typeof this.views.suites[parent.id] == 'undefined') {
+      this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views);
+    }
+    parentDiv = this.views.suites[parent.id].element;
+  }
+
+  parentDiv.appendChild(childElement);
+};
+
+
+jasmine.HtmlReporterHelpers.addHelpers = function(ctor) {
+  for(var fn in jasmine.HtmlReporterHelpers) {
+    ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn];
+  }
+};
+

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/test/autotest/html/ReporterView.js
----------------------------------------------------------------------
diff --git a/test/autotest/html/ReporterView.js b/test/autotest/html/ReporterView.js
new file mode 100644
index 0000000..6a6d005
--- /dev/null
+++ b/test/autotest/html/ReporterView.js
@@ -0,0 +1,164 @@
+jasmine.HtmlReporter.ReporterView = function(dom) {
+  this.startedAt = new Date();
+  this.runningSpecCount = 0;
+  this.completeSpecCount = 0;
+  this.passedCount = 0;
+  this.failedCount = 0;
+  this.skippedCount = 0;
+
+  this.createResultsMenu = function() {
+    this.resultsMenu = this.createDom('span', {className: 'resultsMenu bar'},
+      this.summaryMenuItem = this.createDom('a', {className: 'summaryMenuItem', href: "#"}, '0 specs'),
+      ' | ',
+      this.detailsMenuItem = this.createDom('a', {className: 'detailsMenuItem', href: "#"}, '0 failing'));
+
+    this.summaryMenuItem.onclick = function() {
+      dom.reporter.className = dom.reporter.className.replace(/ showDetails/g, '');
+    };
+
+    this.detailsMenuItem.onclick = function() {
+      showDetails();
+    };
+  };
+
+  this.addSpecs = function(specs, specFilter) {
+    this.totalSpecCount = specs.length;
+
+    this.views = {
+      specs: {},
+      suites: {}
+    };
+
+    for (var i = 0; i < specs.length; i++) {
+      var spec = specs[i];
+      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom, this.views);
+      if (specFilter(spec)) {
+        this.runningSpecCount++;
+      }
+    }
+  };
+
+  this.specComplete = function(spec) {
+    this.completeSpecCount++;
+
+    if (isUndefined(this.views.specs[spec.id])) {
+      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom);
+    }
+
+    var specView = this.views.specs[spec.id];
+
+    switch (specView.status()) {
+      case 'passed':
+        this.passedCount++;
+        break;
+
+      case 'failed':
+        this.failedCount++;
+        break;
+
+      case 'skipped':
+        this.skippedCount++;
+        break;
+    }
+
+    specView.refresh();
+    this.refresh();
+  };
+
+  this.suiteComplete = function(suite) {
+    var suiteView = this.views.suites[suite.id];
+    if (isUndefined(suiteView)) {
+      return;
+    }
+    suiteView.refresh();
+  };
+
+  this.refresh = function() {
+
+    if (isUndefined(this.resultsMenu)) {
+      this.createResultsMenu();
+    }
+
+    // currently running UI
+    if (isUndefined(this.runningAlert)) {
+      this.runningAlert = this.createDom('a', {href: "?", className: "runningAlert bar"});
+      dom.alert.appendChild(this.runningAlert);
+    }
+    this.runningAlert.innerHTML = "Running " + this.completeSpecCount + " of " + specPluralizedFor(this.totalSpecCount);
+
+    // skipped specs UI
+    if (isUndefined(this.skippedAlert)) {
+      this.skippedAlert = this.createDom('a', {href: "?", className: "skippedAlert bar"});
+    }
+
+    this.skippedAlert.innerHTML = "Skipping " + this.skippedCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
+
+    if (this.skippedCount === 1 && isDefined(dom.alert)) {
+      dom.alert.appendChild(this.skippedAlert);
+    }
+
+    // passing specs UI
+    if (isUndefined(this.passedAlert)) {
+      this.passedAlert = this.createDom('span', {href: "?", className: "passingAlert bar"});
+    }
+    this.passedAlert.innerHTML = "Passing " + specPluralizedFor(this.passedCount);
+
+    // failing specs UI
+    if (isUndefined(this.failedAlert)) {
+      this.failedAlert = this.createDom('span', {href: "?", className: "failingAlert bar"});
+    }
+    this.failedAlert.innerHTML = "Failing " + specPluralizedFor(this.failedCount);
+
+    if (this.failedCount === 1 && isDefined(dom.alert)) {
+      dom.alert.appendChild(this.failedAlert);
+      dom.alert.appendChild(this.resultsMenu);
+    }
+
+    // summary info
+    this.summaryMenuItem.innerHTML = "" + specPluralizedFor(this.runningSpecCount);
+    this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing";
+  };
+
+  this.complete = function() {
+    dom.alert.removeChild(this.runningAlert);
+
+    this.skippedAlert.innerHTML = "Ran " + this.runningSpecCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
+
+    if (this.failedCount === 0) {
+      dom.alert.appendChild(this.createDom('span', {className: 'passingAlert bar'}, "Passing " + specPluralizedFor(this.passedCount)));
+    } else {
+      showDetails();
+    }
+
+    dom.banner.appendChild(this.createDom('span', {className: 'duration'}, "finished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s"));
+  };
+
+  return this;
+
+  function showDetails() {
+    if (dom.reporter.className.search(/showDetails/) === -1) {
+      dom.reporter.className += " showDetails";
+    }
+  }
+
+  function isUndefined(obj) {
+    return typeof obj === 'undefined';
+  }
+
+  function isDefined(obj) {
+    return !isUndefined(obj);
+  }
+
+  function specPluralizedFor(count) {
+    var str = count + " spec";
+    if (count > 1) {
+      str += "s"
+    }
+    return str;
+  }
+
+};
+
+jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.ReporterView);
+
+

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/test/autotest/html/SpecView.js
----------------------------------------------------------------------
diff --git a/test/autotest/html/SpecView.js b/test/autotest/html/SpecView.js
new file mode 100644
index 0000000..e8a3c23
--- /dev/null
+++ b/test/autotest/html/SpecView.js
@@ -0,0 +1,79 @@
+jasmine.HtmlReporter.SpecView = function(spec, dom, views) {
+  this.spec = spec;
+  this.dom = dom;
+  this.views = views;
+
+  this.symbol = this.createDom('li', { className: 'pending' });
+  this.dom.symbolSummary.appendChild(this.symbol);
+
+  this.summary = this.createDom('div', { className: 'specSummary' },
+      this.createDom('a', {
+        className: 'description',
+        href: '?spec=' + encodeURIComponent(this.spec.getFullName()),
+        title: this.spec.getFullName()
+      }, this.spec.description)
+  );
+
+  this.detail = this.createDom('div', { className: 'specDetail' },
+      this.createDom('a', {
+        className: 'description',
+        href: '?spec=' + encodeURIComponent(this.spec.getFullName()),
+        title: this.spec.getFullName()
+      }, this.spec.getFullName())
+  );
+};
+
+jasmine.HtmlReporter.SpecView.prototype.status = function() {
+  return this.getSpecStatus(this.spec);
+};
+
+jasmine.HtmlReporter.SpecView.prototype.refresh = function() {
+  this.symbol.className = this.status();
+
+  switch (this.status()) {
+    case 'skipped':
+      break;
+
+    case 'passed':
+      this.appendSummaryToSuiteDiv();
+      break;
+
+    case 'failed':
+      this.appendSummaryToSuiteDiv();
+      this.appendFailureDetail();
+      break;
+  }
+};
+
+jasmine.HtmlReporter.SpecView.prototype.appendSummaryToSuiteDiv = function() {
+  this.summary.className += ' ' + this.status();
+  this.appendToSummary(this.spec, this.summary);
+};
+
+jasmine.HtmlReporter.SpecView.prototype.appendFailureDetail = function() {
+  this.detail.className += ' ' + this.status();
+
+  var resultItems = this.spec.results().getItems();
+  var messagesDiv = this.createDom('div', { className: 'messages' });
+
+  for (var i = 0; i < resultItems.length; i++) {
+    var result = resultItems[i];
+
+    if (result.type == 'log') {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
+    } else if (result.type == 'expect' && result.passed && !result.passed()) {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
+
+      if (result.trace.stack) {
+        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
+      }
+    }
+  }
+
+  if (messagesDiv.childNodes.length > 0) {
+    this.detail.appendChild(messagesDiv);
+    this.dom.details.appendChild(this.detail);
+  }
+};
+
+jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SpecView);

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/test/autotest/html/SuiteView.js
----------------------------------------------------------------------
diff --git a/test/autotest/html/SuiteView.js b/test/autotest/html/SuiteView.js
new file mode 100644
index 0000000..19a1efa
--- /dev/null
+++ b/test/autotest/html/SuiteView.js
@@ -0,0 +1,22 @@
+jasmine.HtmlReporter.SuiteView = function(suite, dom, views) {
+  this.suite = suite;
+  this.dom = dom;
+  this.views = views;
+
+  this.element = this.createDom('div', { className: 'suite' },
+      this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(this.suite.getFullName()) }, this.suite.description)
+  );
+
+  this.appendToSummary(this.suite, this.element);
+};
+
+jasmine.HtmlReporter.SuiteView.prototype.status = function() {
+  return this.getSpecStatus(this.suite);
+};
+
+jasmine.HtmlReporter.SuiteView.prototype.refresh = function() {
+  this.element.className += " " + this.status();
+};
+
+jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SuiteView);
+

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/test/autotest/html/TrivialReporter.js
----------------------------------------------------------------------
diff --git a/test/autotest/html/TrivialReporter.js b/test/autotest/html/TrivialReporter.js
new file mode 100644
index 0000000..167ac50
--- /dev/null
+++ b/test/autotest/html/TrivialReporter.js
@@ -0,0 +1,192 @@
+/* @deprecated Use jasmine.HtmlReporter instead
+ */
+jasmine.TrivialReporter = function(doc) {
+  this.document = doc || document;
+  this.suiteDivs = {};
+  this.logRunningSpecs = false;
+};
+
+jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
+  var el = document.createElement(type);
+
+  for (var i = 2; i < arguments.length; i++) {
+    var child = arguments[i];
+
+    if (typeof child === 'string') {
+      el.appendChild(document.createTextNode(child));
+    } else {
+      if (child) { el.appendChild(child); }
+    }
+  }
+
+  for (var attr in attrs) {
+    if (attr == "className") {
+      el[attr] = attrs[attr];
+    } else {
+      el.setAttribute(attr, attrs[attr]);
+    }
+  }
+
+  return el;
+};
+
+jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
+  var showPassed, showSkipped;
+
+  this.outerDiv = this.createDom('div', { id: 'TrivialReporter', className: 'jasmine_reporter' },
+      this.createDom('div', { className: 'banner' },
+        this.createDom('div', { className: 'logo' },
+            this.createDom('span', { className: 'title' }, "Jasmine"),
+            this.createDom('span', { className: 'version' }, runner.env.versionString())),
+        this.createDom('div', { className: 'options' },
+            "Show ",
+            showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
+            this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
+            showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
+            this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
+            )
+          ),
+
+      this.runnerDiv = this.createDom('div', { className: 'runner running' },
+          this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
+          this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
+          this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
+      );
+
+  this.document.body.appendChild(this.outerDiv);
+
+  var suites = runner.suites();
+  for (var i = 0; i < suites.length; i++) {
+    var suite = suites[i];
+    var suiteDiv = this.createDom('div', { className: 'suite' },
+        this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
+        this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
+    this.suiteDivs[suite.id] = suiteDiv;
+    var parentDiv = this.outerDiv;
+    if (suite.parentSuite) {
+      parentDiv = this.suiteDivs[suite.parentSuite.id];
+    }
+    parentDiv.appendChild(suiteDiv);
+  }
+
+  this.startedAt = new Date();
+
+  var self = this;
+  showPassed.onclick = function(evt) {
+    if (showPassed.checked) {
+      self.outerDiv.className += ' show-passed';
+    } else {
+      self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
+    }
+  };
+
+  showSkipped.onclick = function(evt) {
+    if (showSkipped.checked) {
+      self.outerDiv.className += ' show-skipped';
+    } else {
+      self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
+    }
+  };
+};
+
+jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
+  var results = runner.results();
+  var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
+  this.runnerDiv.setAttribute("class", className);
+  //do it twice for IE
+  this.runnerDiv.setAttribute("className", className);
+  var specs = runner.specs();
+  var specCount = 0;
+  for (var i = 0; i < specs.length; i++) {
+    if (this.specFilter(specs[i])) {
+      specCount++;
+    }
+  }
+  var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
+  message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
+  this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
+
+  this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
+};
+
+jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
+  var results = suite.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.totalCount === 0) { // todo: change this to check results.skipped
+    status = 'skipped';
+  }
+  this.suiteDivs[suite.id].className += " " + status;
+};
+
+jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
+  if (this.logRunningSpecs) {
+    this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
+  }
+};
+
+jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
+  var results = spec.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.skipped) {
+    status = 'skipped';
+  }
+  var specDiv = this.createDom('div', { className: 'spec '  + status },
+      this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
+      this.createDom('a', {
+        className: 'description',
+        href: '?spec=' + encodeURIComponent(spec.getFullName()),
+        title: spec.getFullName()
+      }, spec.description));
+
+
+  var resultItems = results.getItems();
+  var messagesDiv = this.createDom('div', { className: 'messages' });
+  for (var i = 0; i < resultItems.length; i++) {
+    var result = resultItems[i];
+
+    if (result.type == 'log') {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
+    } else if (result.type == 'expect' && result.passed && !result.passed()) {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
+
+      if (result.trace.stack) {
+        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
+      }
+    }
+  }
+
+  if (messagesDiv.childNodes.length > 0) {
+    specDiv.appendChild(messagesDiv);
+  }
+
+  this.suiteDivs[spec.suite.id].appendChild(specDiv);
+};
+
+jasmine.TrivialReporter.prototype.log = function() {
+  var console = jasmine.getGlobal().console;
+  if (console && console.log) {
+    if (console.log.apply) {
+      console.log.apply(console, arguments);
+    } else {
+      console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
+    }
+  }
+};
+
+jasmine.TrivialReporter.prototype.getLocation = function() {
+  return this.document.location;
+};
+
+jasmine.TrivialReporter.prototype.specFilter = function(spec) {
+  var paramMap = {};
+  var params = this.getLocation().search.substring(1).split('&');
+  for (var i = 0; i < params.length; i++) {
+    var p = params[i].split('=');
+    paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
+  }
+
+  if (!paramMap.spec) {
+    return true;
+  }
+  return spec.getFullName().indexOf(paramMap.spec) === 0;
+};

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/db9f6fe6/test/autotest/index.html
----------------------------------------------------------------------
diff --git a/test/autotest/index.html b/test/autotest/index.html
new file mode 100644
index 0000000..6ebccbd
--- /dev/null
+++ b/test/autotest/index.html
@@ -0,0 +1,59 @@
+<!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>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+    <meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=1.0;" />
+
+    <title>Cordova API Specs</title>
+
+    <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
+    <script type="text/javascript" src="../cordova-incl.js"></script>
+  </head>
+  <body id="stage" class="theme">
+    <h1>Cordova API Specs</h1>
+
+    <a href="pages/all.html" class="btn large" style="width:100%;">Run All Tests</a>
+    <a href="pages/accelerometer.html" class="btn large" style="width:100%;">Run Accelerometer Tests</a>
+    <a href="pages/battery.html" class="btn large" style="width:100%;">Run Battery Tests</a>
+    <a href="pages/camera.html" class="btn large" style="width:100%;">Run Camera Tests</a>
+    <a href="pages/capture.html" class="btn large" style="width:100%;">Run Capture Tests</a>
+    <a href="pages/compass.html" class="btn large" style="width:100%;">Run Compass Tests</a>
+    <a href="pages/contacts.html" class="btn large" style="width:100%;">Run Contacts Tests</a>
+    <a href="pages/datauri.html" class="btn large" style="width:100%;">Run Data URI Tests</a>
+    <a href="pages/device.html" class="btn large" style="width:100%;">Run Device Tests</a>
+    <a href="pages/file.html" class="btn large" style="width:100%;">Run File Tests</a>
+    <a href="pages/filetransfer.html" class="btn large" style="width:100%;">Run FileTransfer Tests</a>
+    <a href="pages/geolocation.html" class="btn large" style="width:100%;">Run Geolocation Tests</a>
+    <a href="pages/globalization.html" class="btn large" style="width:100%;">Run Globalization Tests</a>
+    <a href="pages/media.html" class="btn large" style="width:100%;">Run Media Tests</a>
+    <a href="pages/network.html" class="btn large" style="width:100%;">Run Network Tests</a>
+    <a href="pages/notification.html" class="btn large" style="width:100%;">Run Notification Tests</a>
+    <a href="pages/platform.html" class="btn large" style="width:100%;">Run Platform Tests</a>
+    <a href="pages/storage.html" class="btn large" style="width:100%;">Run Storage Tests</a>
+    <a href="pages/bridge.html" class="btn large" style="width:100%;">Run Bridge Tests</a>
+
+    <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
+  </body>
+</html>


Mime
View raw message