ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Contact functions (Lotus Notes or Android/iPhone/iPad)
  • Special case
  • Required permissions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds a contact:
  • AndroidAndroid Widget iPhone/iPad from the list of contacts on the device (Android, iPhone or iPad).
AndroidAndroid Widget iPhone/iPad
// Variables locales
tContact is Contact
tTéléphone is Phone

// Identité
tContact.LastName = SAI_Nom
tContact.FirstName = SAI_Prénom

// Numéros de téléphone Fixe
IF SAI_TéléphoneFixe <> "" THEN
	tTéléphone.Number = SAI_TéléphoneFixe
	tTéléphone.Type = phoneHome
	Add(tContact.Phone, tTéléphone)
END

// Ajout
IF NOT ContactAdd(tContact, gSource) THEN
	Error("Impossible de créer le contact.")
ELSE
	FEN_TableContacts.RafraichitListeContact()
	Close()
END
Syntax
AndroidAndroid Widget iPhone/iPad

Adding a contact to the device's contact list Hide the details

<Result> = ContactAdd(<Contact> [, <Source>])
<Result>: Boolean
  • True if the addition was performed,
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Contact>: Contact variable
Name of the Contact variable corresponding to the contact to add.
<Source>: Optional ContactSource variable
Name of the ContactSource variable corresponding to the source or to the account into which the contact will be added. If this parameter is not specified, the contact will be associated with no account.
Remarks
AndroidAndroid Widget iPhone/iPad

Special case

To display the New Contact window in the device's native Contacts application, use ContactCreate.
AndroidAndroid Widget

Required permissions

This function changes the permissions required by the application.
Permission required: WRITE_CONTACTS
This permission allows the application to write (without reading) the data of the user contacts.
Related Examples:
WM Managing Contacts Cross-platform examples (WINDEV Mobile): WM Managing Contacts
[ + ] This example presents the management of contacts for Android et iOS.
It is used o:
- list the contacts found on the phone
- call the contacts
- send SMSs to the contacts
- ...
Component: wd300com.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help