mobileAddContact

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
mobileAddContact <contactArray>
Summary

Allows the user to add a contact to the contact list.

Introduced5.5.1
OSios, android
Platformsmobile
Parameters
NameTypeDescription
contactArray

An array describing the contact.

Example
put "Just adding this" into tContact["note"]
put "Jobs Ave" into tContact["address"]["home"][1]["street"]
put "Job City" into tContact["address"]["home"][1]["city"]
put "test@livecode.com" into tContact["email"]["home"][1]
mobileAddContact tContact
Values
NameTypeDescription
return

The ID of the contact that was created. If no contact could be created, then empty is returned.

RelatedCommand: mobilePickDate, mobileRemoveContact, mobilePickMedia, mobilePickContact, mobileShowContact, mobilePick, mobileFindContact, mobileCreateContact
Function: mobileGetContactData
Description

Allows the user to create a contact in the contact list, based on some existing contact information. The contact information is collected in a nested array structure as follows:

Person Information - The personal information of the contact is stored at the top level of the array and has the following keys:

  • "firstname": The first name.
  • "middlename": The middle name.
  • "lastname": The last name.
  • "alternatename": The alternative name.
  • "nickname": The nick name (iOS only).
  • "firstnamephonetic": The phonetic transcription of the first name.
  • "middlenamephonetic": The phonetic transcription of the middle name.
  • "lastnamephonetic": The phonetic transcription of the last name.
  • "prefix": The name prefix.
  • "suffix": The name suffix.
  • "organization": The name of the organization.
  • "jobtitle": The job title (iOS only).
  • "department": The name of the department (iOS only).
  • "message": A person message (iOS only).
  • "note": A person note.

E-Mail Addresses - The e-mail addresses of the contact are stored in integer indexed arrays starting at one under the key email. This allows any number of e-mail addresses to be stored against a particular category. There are three categories of e-mail address: - "home": - The home e-mail address.
- "work": - The work e-mail address. - "other": - An alternative e-mail address.

Telephone Numbers - The telephone numbers of the contact are stored in integer indexed arrays starting at one under the key phone. This allows any number of telephone numbers to be stored against a particular category. There are ten categories of phone numbers: - "mobile" - The mobile telephone number.
- "iphone" - The iPhone telephone number (iOS only). - "main" - The main telephone number (iOS only). - "home" - The home telephone number. - "work" - The work telephone number. - "homefax" - The home FAX number (iOS only). - "workfax" - The work FAX number (iOS only). - "otherfax" - The other FAX number (iOS = 5.0 only). - "pager" - The pager number (iOS only). - "other" - An alternative telephone number.

Address - Addresses of the contact are stored as sub arrays under the key address. There are three categories of address: - "home" - The home address.
- "work" - The work address. - "other" - The other address.

Address Subkey - Each address category is an integer indexed array, starting at one under the key address. This allows any number of addresses to be stored against a particular category. There are six categories of address subkey: - "street" - The address street.
- "city" - The address city. - "state" - The address state. - "zip" - The address ZIP code. - "country" - The address country. - "countrycode" - The address country code (iOS only).

Use the mobileAddContact command to add a contact to the contact list. Use the mobileGetContactData function to retreive contact