MContacts

From HTML5 Builder
Jump to: navigation, search
MContacts lets your application access device’s contacts database.
Note: Before you use MContacts for Android applications, read this blog post.

Functions

These are JavaScript functions you can call when you use this component in a screen.
Note: Replace ComponentName with the actual name of the component, that is, the value of its Name property. For example: MContacts1.
ComponentNameList
Retrieves contacts from device’s contacts database. It triggers OnList event, or OnListError if an error occurs.
ComponentNameRemove
Remove contact passed as argument. It triggers OnRemove event, or OnRemoveError if an error occurs.
ComponentNameSave
Save new contact passed as argument. It triggers OnSave event, or OnSaveError if an error occurs.

Events

These are JavaScript MContacts events you can associate to JavaScript functions.

OnList
This event gets triggered when ComponentNameList successfully retrieves contacts’ information. Its only parameter is the array of retrieved contacts.
OnListError
This event gets triggered when an error occurs after calling ComponentNameList. Its only parameter is a ContactError object.
OnRemove
This event gets triggered when ComponentNameRemove successfully deletes a contact.
OnRemoveError
This event gets triggered when an error occurs after calling ComponentNameRemove. Its only parameter is a ContactError object.
OnSave
This event gets triggered when ComponentNameSave successfully saves a contact.
OnSaveError
This event gets triggered when an error occurs after calling ComponentNameSave. Its only parameter is a ContactError object.

See Also

Personal tools