Titanium.Contacts.Person
> Titanium.Contacts.Person

An object that represents a contact record for a person or organization in the system contacts address book.

A person object is created using Titanium.Contacts.createPerson.

The following two kinds of properties exist for this object:

  • single value - contains either a string or number type value, an array of string type values, or null if unset.
  • multi-value - contains a dictionary with typical keys of home, work and/or other. Each key contains either a string type value, an array of string type values, or a dictionary containing key/value pairs with string type values.

Adding and Modifying Properties

Support for adding and modifying properties is currently supported on iOS and Android.

Keys as Address Book UI Labels

Keys act as labels in the address book user interface.

Although there is limited support for custom, arbitrarily-named, keys when used with multi-value properties, there is no support them with single value properties.

On iOS, creating custom keys is not recommended, and will lead to undefined results.

If a label has been created by the user of the device and used with a multi-value property, it will exist as a key with the same name.

See examples in Titanium.Contacts for more information.

  • 0.8
  • 0.8
  • 0.8
Defined By

Properties

Titanium.Contacts.Person
: Dictionary
Addresses for the person. ...

Addresses for the person. Multi-value. Read-only on Android.

The format of the dictionary accepted by this property is as follows:

  • Keys: any of home, work, and/or other.
  • Values: arrays of dictionary types with seven keys, CountryCode, Street, City, , State, Country and PostalCode, each with a string type value.

On Android:

'CountryCode' and 'County' are currently not supported.

On iOS:

The CountryCode key value may be one of the recognized two-character ISO 3166-1 country codes, and determines the format in which the contact is presented by the address book user interface. See the wikipedia section ISO 3166-1 alpha-2 for a comprehensive list of codes.

Titanium.Contacts.Person
: Dictionary
Alternate birthday of the person. ...

Alternate birthday of the person. Single Dictionary.

Requires: iOS 8.0 and later

The format of the dictionary accepted by this property is as follows:

  • Keys: calendarIdentifier, era, year, month, day and isLeapMonth.
  • Values: Use chinese, hebrew and islamic-civil for calendarIdentifier. Use number type for era, year, month and day. These must be consistent with corresponding calendarIdentifier. Use boolean type for isLeapMonth.
  • 3.6.0
  • 3.6.0
apiName : Stringreadonly

The name of the API that this proxy corresponds to.

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Button returns Ti.UI.Button.

  • 3.2.0
  • 3.2.0
  • 3.2.0
Titanium.Contacts.Person
: String
Date of birth of the person. ...

Date of birth of the person. Single value.

Date format is "yyyy-_MM_-ddTHH:mm:ss.SSS+0000"

Indicates if the proxy will bubble an event to its parent. ...

Indicates if the proxy will bubble an event to its parent.

Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.

Default: true

  • 3.0.0
  • 3.0.0
  • 3.0.0
Titanium.Contacts.Person
: Stringreadonly
Date and time that the person record was created. ...

Date and time that the person record was created. Single value. Deprecated since iOS 9.

Requires: iOS 8.0 and earlier

Date format is "yyyy-_MM_-ddTHH:mm:ss.SSS+0000"

  • 0.8
  • 0.8
Titanium.Contacts.Person
: Dictionary
Dates associated with the person. ...

Dates associated with the person. Multi-value.

Adding or modifying this property is not currently supported.

The format of the dictionary accepted by this property is as follows:

  • Keys: any of anniversary and/or other.
  • Values: array of string type.

Date format is "yyyy-_MM_-ddTHH:mm:ss.SSS+0000"

Titanium.Contacts.Person
: String
Department of the person. ...

Department of the person. Single value.

Titanium.Contacts.Person
: Dictionary
Email addresses for the person. ...

Email addresses for the person. Multi-value. Read-only on Android.

The format of the dictionary accepted by this property is as follows:

  • Keys: any of home, work, and/or other.
  • Values: array of string type.
Titanium.Contacts.Person
: String
First name of the person. ...

First name of the person. Single value.

Titanium.Contacts.Person
: String
Phonetic first name of the person. ...

Phonetic first name of the person. Single value.

Titanium.Contacts.Person
: Stringreadonly
Localized full name of the person. ...

Localized full name of the person. Single value. Read-only on Android.

The full name will be printed in the order of. Prefix,first name, middle name, family name, suffix.

Titanium.Contacts.Person
: Numberreadonly
Record identifier of the person. ...

Record identifier of the person. Single value.

  • 0.8
Titanium.Contacts.Person
: Stringreadonly
Identifier of the person. ...

Identifier of the person.

Requires: iOS 9.0 and later

Prior to iOS 9, use the recordId property.

  • 5.0.0
  • 5.0.0
Titanium.Contacts.Person
: Titanium.Blob
Image for the person. ...

Image for the person. Single value. Read-only for >= iOS9

Set to null to remove the image.

Titanium.Contacts.Person
: Dictionary
Instant messenger information of the person. ...

Instant messenger information of the person. Multi-value.

The format of the dictionary accepted by this property is as follows:

  • Keys: any of home, work and/or other.
  • Values: arrays of dictionary types with two keys, service and username, each with a string type value.

The service key value may be one of AIM, Facebook, GaduGadu, GoogleTalk, ICQ, Jabber, MSN, QQ, Skype, or Yahoo. These values are key sensitive.

Titanium.Contacts.Person
: String
Job title of the person. ...

Job title of the person. Single value.

Titanium.Contacts.Person
: Number
Determines the type of information the person record contains; either person or organization. ...

Determines the type of information the person record contains; either person or organization. Read-only on Android.

This API can be assigned the following constants:

Titanium.Contacts.Person
: String
Last name of the person. ...

Last name of the person. Single value.

Titanium.Contacts.Person
: String
Phonetic last name of the person. ...

Phonetic last name of the person. Single value.

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.

  • 3.6.0
Titanium.Contacts.Person
: String
Middle name of the person. ...

Middle name of the person. Single value.

Titanium.Contacts.Person
: String
Phonetic middle name of the person. ...

Phonetic middle name of the person. Single value.

Titanium.Contacts.Person
: Stringreadonly
Date and time that the person record was last modified. ...

Date and time that the person record was last modified. Single value. Deprecated since iOS 9.

Requires: iOS 8.0 and earlier

Date format is "yyyy-_MM_-ddTHH:mm:ss.SSS+0000"

  • 0.8
  • 0.8
Titanium.Contacts.Person
: String
Nickname of the person. ...

Nickname of the person. Single value.

Titanium.Contacts.Person
: String
Notes for the person. ...

Notes for the person. Single value.

Titanium.Contacts.Person
: String
Organization to which the person belongs. ...

Organization to which the person belongs. Single value.

Titanium.Contacts.Person
: Dictionary
Phone numbers for the person. ...

Phone numbers for the person. Multi-value. Read-only on Android.

The format of the dictionary accepted by this property is as follows:

  • Keys: any of home, work, other, mobile, pager, workFax, homeFax, main, and/or iPhone.
  • Values: array of string type.
Titanium.Contacts.Person
: Stringreadonly
Prefix for the person. ...

Prefix for the person. Single value.

Titanium.Contacts.Person
: Number
Record identifier of the person. ...

Record identifier of the person. Single value. Deprecated since iOS 9.

Requires: iOS 8.4 and earlier

For iOS 9 and later, use the identifier property. In iOS 8, a contact can be selected without requiring User permission. In such case this property returns -1.

  • 0.8
  • 0.8
Titanium.Contacts.Person
: Dictionary
Names of people to which the person is related. ...

Names of people to which the person is related. Multi-value.

The format of the dictionary accepted by this property is as follows:

  • Keys: any of mother, father, parent, brother, sister, child, friend, spouse, partner, assistant, manager, and/or other.
  • Values: array of string type.
Titanium.Contacts.Person
: Dictionary
Social profile information of the person. ...

Social profile information of the person. Multi-value.

The format of the dictionary accepted by this property is as follows:

  • Keys: any of home, work and/or other.
  • Values: arrays of dictionary types with two keys, service and username each with a string type value.

The service key value may be one of twitter, sinaweibo, gamecenter, facebook, myspace, linkedin, or flickr. These values are key sensitive.

  • 3.6.0
  • 3.6.0
Titanium.Contacts.Person
: Stringreadonly
Suffix for the person. ...

Suffix for the person. Single value.

Titanium.Contacts.Person
: Dictionary
URLs of webpages associated with the person. ...

URLs of webpages associated with the person. Multi-value.

The format of the dictionary accepted by this property is as follows:

  • Keys: any of homepage, home, work, and/or other.
  • Values: array of string type.
Defined By

Methods

Adds the specified callback as an event listener for the named event. ...

Adds the specified callback as an event listener for the named event.

Parameters

  • name : String

    Name of the event.

  • callback : Callback<Object>

    Callback function to invoke when the event is fired.

Returns

  • void
Applies the properties to the proxy. ...

Applies the properties to the proxy.

Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • props : Dictionary

    A dictionary of properties to apply.

Returns

  • void
Fires a synthesized event to any registered listeners. ...

Fires a synthesized event to any registered listeners.

Parameters

  • name : String

    Name of the event.

  • event : Dictionary

    A dictionary of keys and values to add to the Titanium.Event object sent to the listeners.

Returns

  • void
Titanium.Contacts.Person
( ) : Dictionary
Gets the value of the address property. ...

Gets the value of the address property.

Returns

Titanium.Contacts.Person
( ) : Dictionary
Gets the value of the alternateBirthday property. ...

Gets the value of the alternateBirthday property.

  • 3.6.0
  • 3.6.0

Returns

Gets the value of the apiName property. ...

Gets the value of the apiName property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Returns

  • String
Titanium.Contacts.Person
( ) : String
Gets the value of the birthday property. ...

Gets the value of the birthday property.

Returns

  • String
Gets the value of the bubbleParent property. ...

Gets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Returns

  • Boolean
Titanium.Contacts.Person
( ) : String
Gets the value of the created property. ...

Gets the value of the created property.

  • 0.8
  • 0.8

Returns

  • String
Titanium.Contacts.Person
( ) : Dictionary
Gets the value of the date property. ...

Gets the value of the date property.

Returns

Titanium.Contacts.Person
( ) : String
Gets the value of the department property. ...

Gets the value of the department property.

Returns

  • String
Titanium.Contacts.Person
( ) : Dictionary
Gets the value of the email property. ...

Gets the value of the email property.

Returns

Titanium.Contacts.Person
( ) : String
Gets the value of the firstName property. ...

Gets the value of the firstName property.

Returns

  • String
Titanium.Contacts.Person
( ) : String
Gets the value of the firstPhonetic property. ...

Gets the value of the firstPhonetic property.

Returns

  • String
Titanium.Contacts.Person
( ) : String
Gets the value of the fullName property. ...

Gets the value of the fullName property.

Returns

  • String
Titanium.Contacts.Person
( ) : Number
Gets the value of the id property. ...

Gets the value of the id property.

  • 0.8

Returns

  • Number
Titanium.Contacts.Person
( ) : String
Gets the value of the identifier property. ...

Gets the value of the identifier property.

  • 5.0.0
  • 5.0.0

Returns

  • String
Titanium.Contacts.Person
( ) : Titanium.Blob
Gets the value of the image property. ...

Gets the value of the image property.

Returns

Titanium.Contacts.Person
( ) : Dictionary
Gets the value of the instantMessage property. ...

Gets the value of the instantMessage property.

Returns

Titanium.Contacts.Person
( ) : String
Gets the value of the jobTitle property. ...

Gets the value of the jobTitle property.

Returns

  • String
Titanium.Contacts.Person
( ) : Number
Gets the value of the kind property. ...

Gets the value of the kind property.

Returns

  • Number
Titanium.Contacts.Person
( ) : String
Gets the value of the lastName property. ...

Gets the value of the lastName property.

Returns

  • String
Titanium.Contacts.Person
( ) : String
Gets the value of the lastPhonetic property. ...

Gets the value of the lastPhonetic property.

Returns

  • String
Gets the value of the lifecycleContainer property. ...

Gets the value of the lifecycleContainer property.

  • 3.6.0

Returns

Titanium.Contacts.Person
( ) : String
Gets the value of the middleName property. ...

Gets the value of the middleName property.

Returns

  • String
Titanium.Contacts.Person
( ) : String
Gets the value of the middlePhonetic property. ...

Gets the value of the middlePhonetic property.

Returns

  • String
Titanium.Contacts.Person
( ) : String
Gets the value of the modified property. ...

Gets the value of the modified property.

  • 0.8
  • 0.8

Returns

  • String
Titanium.Contacts.Person
( ) : String
Gets the value of the nickname property. ...

Gets the value of the nickname property.

Returns

  • String
Titanium.Contacts.Person
( ) : String
Gets the value of the note property. ...

Gets the value of the note property.

Returns

  • String
Titanium.Contacts.Person
( ) : String
Gets the value of the organization property. ...

Gets the value of the organization property.

Returns

  • String
Titanium.Contacts.Person
( ) : Dictionary
Gets the value of the phone property. ...

Gets the value of the phone property.

Returns

Titanium.Contacts.Person
( ) : String
Gets the value of the prefix property. ...

Gets the value of the prefix property.

Returns

  • String
Titanium.Contacts.Person
( ) : Number
Gets the value of the recordId property. ...

Gets the value of the recordId property.

  • 0.8
  • 0.8

Returns

  • Number
Titanium.Contacts.Person
( ) : Dictionary
Gets the value of the relatedNames property. ...

Gets the value of the relatedNames property.

Returns

Titanium.Contacts.Person
( ) : Dictionary
Gets the value of the socialProfile property. ...

Gets the value of the socialProfile property.

  • 3.6.0
  • 3.6.0

Returns

Titanium.Contacts.Person
( ) : String
Gets the value of the suffix property. ...

Gets the value of the suffix property.

Returns

  • String
Titanium.Contacts.Person
( ) : Dictionary
Gets the value of the url property. ...

Gets the value of the url property.

Returns

Removes the specified callback as an event listener for the named event. ...

Removes the specified callback as an event listener for the named event.

Multiple listeners can be registered for the same event, so the callback parameter is used to determine which listener to remove.

When adding a listener, you must save a reference to the callback function in order to remove the listener later:

var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);

To remove the listener, pass in a reference to the callback function:

window.removeEventListener('click', listener);

Parameters

  • name : String

    Name of the event.

  • callback : Callback<Object>

    Callback function to remove. Must be the same function passed to addEventListener.

Returns

  • void
Titanium.Contacts.Person
( address )
Sets the value of the address property. ...

Sets the value of the address property.

Parameters

Returns

  • void
Titanium.Contacts.Person
( alternateBirthday )
Sets the value of the alternateBirthday property. ...

Sets the value of the alternateBirthday property.

  • 3.6.0
  • 3.6.0

Parameters

  • alternateBirthday : Dictionary

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( birthday )
Sets the value of the birthday property. ...

Sets the value of the birthday property.

Parameters

  • birthday : String

    New value for the property.

Returns

  • void
Sets the value of the bubbleParent property. ...

Sets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • bubbleParent : Boolean

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( date )
Sets the value of the date property. ...

Sets the value of the date property.

Parameters

Returns

  • void
Titanium.Contacts.Person
( department )
Sets the value of the department property. ...

Sets the value of the department property.

Parameters

  • department : String

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( email )
Sets the value of the email property. ...

Sets the value of the email property.

Parameters

Returns

  • void
Titanium.Contacts.Person
( firstName )
Sets the value of the firstName property. ...

Sets the value of the firstName property.

Parameters

  • firstName : String

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( firstPhonetic )
Sets the value of the firstPhonetic property. ...

Sets the value of the firstPhonetic property.

Parameters

  • firstPhonetic : String

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( image )
Sets the value of the image property. ...

Sets the value of the image property.

Parameters

Returns

  • void
Titanium.Contacts.Person
( instantMessage )
Sets the value of the instantMessage property. ...

Sets the value of the instantMessage property.

Parameters

  • instantMessage : Dictionary

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( jobTitle )
Sets the value of the jobTitle property. ...

Sets the value of the jobTitle property.

Parameters

  • jobTitle : String

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( kind )
Sets the value of the kind property. ...

Sets the value of the kind property.

Parameters

  • kind : Number

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( lastName )
Sets the value of the lastName property. ...

Sets the value of the lastName property.

Parameters

  • lastName : String

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( lastPhonetic )
Sets the value of the lastPhonetic property. ...

Sets the value of the lastPhonetic property.

Parameters

  • lastPhonetic : String

    New value for the property.

Returns

  • void
Sets the value of the lifecycleContainer property. ...

Sets the value of the lifecycleContainer property.

  • 3.6.0

Parameters

Returns

  • void
Titanium.Contacts.Person
( middleName )
Sets the value of the middleName property. ...

Sets the value of the middleName property.

Parameters

  • middleName : String

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( middlePhonetic )
Sets the value of the middlePhonetic property. ...

Sets the value of the middlePhonetic property.

Parameters

  • middlePhonetic : String

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( nickname )
Sets the value of the nickname property. ...

Sets the value of the nickname property.

Parameters

  • nickname : String

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( note )
Sets the value of the note property. ...

Sets the value of the note property.

Parameters

  • note : String

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( organization )
Sets the value of the organization property. ...

Sets the value of the organization property.

Parameters

  • organization : String

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( phone )
Sets the value of the phone property. ...

Sets the value of the phone property.

Parameters

Returns

  • void
Titanium.Contacts.Person
( recordId )
Sets the value of the recordId property. ...

Sets the value of the recordId property.

  • 0.8
  • 0.8

Parameters

  • recordId : Number

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( relatedNames )
Sets the value of the relatedNames property. ...

Sets the value of the relatedNames property.

Parameters

  • relatedNames : Dictionary

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( socialProfile )
Sets the value of the socialProfile property. ...

Sets the value of the socialProfile property.

  • 3.6.0
  • 3.6.0

Parameters

  • socialProfile : Dictionary

    New value for the property.

Returns

  • void
Titanium.Contacts.Person
( url )
Sets the value of the url property. ...

Sets the value of the url property.

Parameters

Returns

  • void