The AddressBook API enables you to programmatically manage the AddressBook of the device.
Event 'AddToContacts'
&IsOK = AddressBook.AddContact(PersonName,PersonLastName,PersonEmail,PersonPhone,CompanyName,PersonPhoto,PersonMessage)
Endevent
Event 'RemoveContact'
&IsOK = AddressBook.RemoveContact(PersonName,PersonLastName,PersonEmail,PersonPhone,PersonMessage)
Endevent
Event 'ViewContact'
AddressBook.ViewContact(PersonName,PersonLastName,PersonEmail,PersonPhone)
Endevent
Event 'ViewContactsList'
&AddressBookContacts = AddressBook.GetAllContacts()
Endevent
It is used to add a contact to the AddressBook. See HowTo: Use AddContact method from Contacts external object
True if success. That means that the contact was added or was already in the AddressBook. False if any failure occurs or the user cancels the execution. If the return value is not used the event execution cancels.
FirstName, LastName, [Email], [Phone], [CompanyName], [Photo], [Message]
It is used to remove a contact from the AddressBook. See HowTo: Use RemoveContact method from Contacts external object
True if success. That means that the contact was removed from the AddressBook. False if any failure occurs, the contact to be removed is not present in the AddressBook or the user cancels the execution. If the return value is not used the event execution cancels.
FirstName, LastName, [Email], [Phone], [Message]
It is used to view the contact information stored in the device. See HowTo: Use ViewContact method from Contacts external object
Parameters: FirstName, LastName, [Email], [Phone]
Retrieves all the contacts from the AddressBooks and returns the result in a collection of the predefined SDT SDTAddressBookContact.
GetAllContacts method is available for Android and iOS as of GeneXus X Evolution 3.
RemoveContact, and ViewContact are only available for iOS.