| Platform | Since |
|---|---|
| Android | 0.8 |
| iPhone | 0.8 |
| iPad | 0.8 |
The top level Contacts module. The Contacts module is used accessing the device Address Book. (Read-only on Android.)
Contacts on Android are currently only read-only, so methods such as createPerson, removePerson, etc., are not supported.
Titanium.Contacts.Person objects which have been removed from the database are invalidated after a save operation, whether from creating a new contact or explicitly calling Titanium.Contacts.save(). Using them may result in unpredictable behavior, including crashes.
| Name | Summary |
|---|---|
| Titanium.Contacts.Group |
An object which represents a group in the contacts database. (iPhone, iPad only.) |
| Titanium.Contacts.Person |
An object which represents a person in the contacts database. |
| Name | Summary |
|---|---|
| addEventListener |
Adds the specified callback as an event listener for the named event. |
| createGroup |
create and return an instance of Titanium.Contacts.Group (iPhone, iPad only.) |
| createPerson |
create and return an instance of Titanium.Contacts.Person (iPad, iPhone only.) |
| fireEvent |
Fires a synthesized event to any registered listeners. |
| getAllGroups |
Returns an of all |
| getAllPeople |
Returns an array of all |
| getGroupByID |
Returns a |
| getPeopleWithName |
Returns an array of |
| getPersonByID |
Returns a |
| removeEventListener |
Removes the specified callback as an event listener for the named event. |
| removeGroup |
Removes a group from the contacts database. (iPhone, iPad only.) |
| removePerson |
Removes a person from the contacts database. (iPhone, iPad only.) |
| revert |
Reverts all changes made to the previous save of the database. (iPhone, iPad only.) |
| save |
Saves all changes to contacts to the database. |
| showContacts |
Displays the contact picker |
| Name | Type | Summary |
|---|---|---|
| CONTACTS_KIND_ORGANIZATION | Number |
constant for 'organization' kind property of Person object read-only |
| CONTACTS_KIND_PERSON | Number |
constant for 'person' kind property of Person object read-only |
| CONTACTS_SORT_FIRST_NAME | Number |
constant for sorting group members by first name read-only |
| CONTACTS_SORT_LAST_NAME | Number |
constant for sorting group members by last name read-only |