PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Special case
  • Required permissions
  • Required application feature
  • Syntax that is using the Contact structure (before Android 2.0)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Adds a contact:
  • Versions 16 and later
    Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad into the list of contacts on the device (Android, iPhone or iPad, Universal Windows).
    New in version 16
    Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad into the list of contacts on the device (Android, iPhone or iPad, Universal Windows).
    Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad into the list of contacts on the device (Android, iPhone or iPad, Universal Windows).
Versions 16 and later
Android This function is now available for Android applications.
New in version 16
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 18 and later
Android Widget This function is now available in Android widget mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 18
Android Widget This function is now available in Android widget mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Android Widget This function is now available in Android widget mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 22 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 22
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad
// Local variables
tContact is Contact
tPhone is Phone
 
// Identity
tContact.Name = EDT_LastName
tContact.FirstName = EDT_FirstName
 
// Home phone numbers
IF EDT_HomePhone <> "" THEN
tPhone.PhoneNumber = EDT_HomePhone
tPhone.Type = phoneHome
Add(tContact.Phone, tPhone)
END
 
// Add
IF NOT ContactAdd(tContact, gSource) THEN
Error("Unable to create the contact.")
ELSE
WIN_TableContacts.RefreshContactList()
Close()
END
Syntax
Versions 17 and later
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad

Adding a contact into the list of contacts on the device (from Android 2.0, iPhone or iPad, Universal Windows) 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.
New in version 17
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad

Adding a contact into the list of contacts on the device (from Android 2.0, iPhone or iPad, Universal Windows) 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.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad

Adding a contact into the list of contacts on the device (from Android 2.0, iPhone or iPad, Universal Windows) 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.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad
Versions 16 and later
Warning
From version 17 (69), this syntax is kept for backward compatibility.
New in version 16
Warning
From version 17 (69), this syntax is kept for backward compatibility.
Warning
From version 17 (69), this syntax is kept for backward compatibility.

Adding a contact into the list of contacts on the device (before Android 2.0, iPhone or iPad, Universal Windows) Hide the details

<Result> = ContactAdd(<Type of contact>)
<Result>: Boolean
  • True if the addition was performed,
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Type of contact>: Integer constant
Type of contact to add. By default, this parameter corresponds to the contactPhone constant.
Remarks
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad

Special case

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

Required permissions

Calling this function changes the permissions required by the application.
Required permission: WRITE_CONTACTS
This permission allows the application to write (without reading) the data of the user contacts.
New in version 16
AndroidAndroid Widget

Required permissions

Calling this function changes the permissions required by the application.
Required permission: WRITE_CONTACTS
This permission allows the application to write (without reading) the data of the user contacts.
AndroidAndroid Widget

Required permissions

Calling this function changes the permissions required by the application.
Required permission: WRITE_CONTACTS
This permission allows the application to write (without reading) the data of the user contacts.
Versions 22 and later
Universal Windows 10 App

Required application feature

When this function is used, an application feature is declared in the application generation wizard.
Required feature: Contacts
This feature allows the applications to access the contacts.
New in version 22
Universal Windows 10 App

Required application feature

When this function is used, an application feature is declared in the application generation wizard.
Required feature: Contacts
This feature allows the applications to access the contacts.
Universal Windows 10 App

Required application feature

When this function is used, an application feature is declared in the application generation wizard.
Required feature: Contacts
This feature allows the applications to access the contacts.
Versions 16 and later
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad

Syntax that is using the Contact structure (before Android 2.0)

Only the following members of the Contact structure will be taken into account when adding the contact:
  • mContact.Name
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.FirstName
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.Notes
  • mContact.HomeAddress
    The home address of the contact on the device will be built from the mContact.HomeAddress, mContact.HomeCity, mContact.HomeZip, mContact.HomeState and mContact.HomeCountry members.
  • mContact.HomeCity
  • mContact.HomeZipCode
  • mContact.HomeState
  • mContact.HomeCountry
  • mContact.HomePhone
  • mContact.HomeFax
  • mContact.MobilePhone
  • mContact.Company
  • mContact.Department
  • mContact.OfficeAddress
    The business address of the contact on the device will be built from the mContact.OfficeAddress, mContact.OfficeCity, mContact.OfficeZip, mContact.OfficeState and mContact.OfficeCountry members.
  • mContact.OfficeCity
  • mContact.OfficeZipCode
  • mContact.OfficeState
  • mContact.OfficeCountry
  • mContact.OfficePhone
  • mContact.OfficeFax
  • mContact.OfficeMobilePhone
  • mContact.OfficePager
  • mContact.Email
New in version 16
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad

Syntax that is using the Contact structure (before Android 2.0)

Only the following members of the Contact structure will be taken into account when adding the contact:
  • mContact.Name
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.FirstName
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.Notes
  • mContact.HomeAddress
    The home address of the contact on the device will be built from the mContact.HomeAddress, mContact.HomeCity, mContact.HomeZip, mContact.HomeState and mContact.HomeCountry members.
  • mContact.HomeCity
  • mContact.HomeZipCode
  • mContact.HomeState
  • mContact.HomeCountry
  • mContact.HomePhone
  • mContact.HomeFax
  • mContact.MobilePhone
  • mContact.Company
  • mContact.Department
  • mContact.OfficeAddress
    The business address of the contact on the device will be built from the mContact.OfficeAddress, mContact.OfficeCity, mContact.OfficeZip, mContact.OfficeState and mContact.OfficeCountry members.
  • mContact.OfficeCity
  • mContact.OfficeZipCode
  • mContact.OfficeState
  • mContact.OfficeCountry
  • mContact.OfficePhone
  • mContact.OfficeFax
  • mContact.OfficeMobilePhone
  • mContact.OfficePager
  • mContact.Email
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad

Syntax that is using the Contact structure (before Android 2.0)

Only the following members of the Contact structure will be taken into account when adding the contact:
  • mContact.Name
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.FirstName
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.Notes
  • mContact.HomeAddress
    The home address of the contact on the device will be built from the mContact.HomeAddress, mContact.HomeCity, mContact.HomeZip, mContact.HomeState and mContact.HomeCountry members.
  • mContact.HomeCity
  • mContact.HomeZipCode
  • mContact.HomeState
  • mContact.HomeCountry
  • mContact.HomePhone
  • mContact.HomeFax
  • mContact.MobilePhone
  • mContact.Company
  • mContact.Department
  • mContact.OfficeAddress
    The business address of the contact on the device will be built from the mContact.OfficeAddress, mContact.OfficeCity, mContact.OfficeZip, mContact.OfficeState and mContact.OfficeCountry members.
  • mContact.OfficeCity
  • mContact.OfficeZipCode
  • mContact.OfficeState
  • mContact.OfficeCountry
  • mContact.OfficePhone
  • mContact.OfficeFax
  • mContact.OfficeMobilePhone
  • mContact.OfficePager
  • mContact.Email
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: wd270com.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment