PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Special cases
  • Creating a contact (without using the creation window)
  • Application in the background: Specific case from Android 10
  • Required application feature
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
Displays the window for contact creation of the native application for contact management found on the device (Android, iPhone or iPad, Universal Windows).
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.
Example
AndroidAndroid Widget iPhone/iPad
// Création d'un contact et initialisation de la structure Contact
IF ContactCreate() = True THEN
Info(StringBuild("Le contact %1 a été ajouté à la liste de vos contacts: ", ...
 mContact.Name))
END
AndroidAndroid Widget iPhone/iPad
gContactEnCours is Contact
gtabContacts is array of Contact
 
// Création d'un contact dans la fenêtre par défaut
IF ContactCreate() = True THEN
// Rafraîchit la liste des contacts affichée dans un champ Zone répétée
nIndice is int = ZR_CONTACTS
LooperDeleteAll(ZR_CONTACTS)
// Liste des contacts
gtabContacts = ContactList()
// Tri des contacts
ArraySort(gtabContacts, asMember, "+Nom")
// Ajout dans la zone répétée
FOR EACH tContact OF gtabContacts
LooperAddLine(ZR_CONTACTS, tContact..Name, tContact..FirstName)
END
END
Syntax

Creating a contact and initializing the Contact variable (from Android 2.0, iPhone, iPad, Universal Windows) Hide the details

<Result> = ContactCreate([<Contact>])
<Result>: Boolean
  • True if a contact was created,
  • False otherwise. For more details on the error, use function ErrorInfo.
Versions 22 and later
Universal Windows 10 App
  • True if the user interface is displayed,
  • False otherwise.
New in version 22
Universal Windows 10 App
  • True if the user interface is displayed,
  • False otherwise.
Universal Windows 10 App
  • True if the user interface is displayed,
  • False otherwise.
<Contact>: Contact variable
Name of the Variable of type Contact containing the data corresponding to the created Contact.
Warning
From version 17 (69), this syntax is kept for backward compatibility.

Creating a contact and initializing the Contact variable (before Android 2.0, iPhone, iPad, Universal Windows) Hide the details

<Result> = ContactCreate()
<Result>: Boolean
  • True if a contact was created,
  • False otherwise. For more details on the error, use function ErrorInfo.
Versions 22 and later
Universal Windows 10 App
  • True if the user interface is displayed,
  • False otherwise.
New in version 22
Universal Windows 10 App
  • True if the user interface is displayed,
  • False otherwise.
Universal Windows 10 App
  • True if the user interface is displayed,
  • False otherwise.
Remarks

Special cases

  • If the user creates a new contact, the Contact structure or the Contact variable is automatically filled with the information relative to this new contact.
  • AndroidAndroid Widget iPhone/iPad The ContactCreate function is blocked until the user validates or cancels the Contact creation window.
  • Versions 22 and later
    Universal Windows 10 App ContactCreate is a non-blocking function.
    New in version 22
    Universal Windows 10 App ContactCreate is a non-blocking function.
    Universal Windows 10 App ContactCreate is a non-blocking function.
  • The ContactCreate function can be used in the emulator. It cannot be used in the simulator.

Creating a contact (without using the creation window)

To create a new contact by programming (without opening any window):
  1. Describe the contact in the Contact structure or in the Contact variable.
  2. Use ContactAdd.
Versions 25 and later
AndroidAndroid Widget

Application in the background: Specific case from Android 10

From Android 10, it is no longer possible to open a window when the application is in the background.
ContactCreate can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). The application will be brought back to the foreground when the notification is clicked, if the ActivateApplication property is set to True. You can also open a window from the procedure passed to the ActionClick property.
New in version 25
AndroidAndroid Widget

Application in the background: Specific case from Android 10

From Android 10, it is no longer possible to open a window when the application is in the background.
ContactCreate can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). The application will be brought back to the foreground when the notification is clicked, if the ActivateApplication property is set to True. You can also open a window from the procedure passed to the ActionClick property.
AndroidAndroid Widget

Application in the background: Specific case from Android 10

From Android 10, it is no longer possible to open a window when the application is in the background.
ContactCreate can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). The application will be brought back to the foreground when the notification is clicked, if the ActivateApplication property is set to True. You can also open a window from the procedure passed to the ActionClick property.
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.
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
- ...
Business / UI classification: Business Logic
Component: wd270android.aar
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment