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.
  • Various
  • Application in the background: Specific case from Android 10
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Opens a system window to select a resource coming:
  • from the device file system,
  • from the Cloud (Google Drive, Microsoft OneDrive, etc.)
  • from one of the content managers installed on the device.
Versions 25 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 25
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 26 and later
AndroidAndroid Widget The syntax that takes a WLanguage procedure as parameter is now available.
New in version 26
AndroidAndroid Widget The syntax that takes a WLanguage procedure as parameter is now available.
AndroidAndroid Widget The syntax that takes a WLanguage procedure as parameter is now available.
Example
AndroidAndroid Widget
// Ouvre la fenêtre système pour la sélection d'une image ou d'un pdf
UriRessource is URI = URISelect(uriImage + TAB + "application/pdf")
IF NOT ErrorOccurred THEN
// Affiche le nom de la ressource sélectionnée
Info(URIGetInfo(UriRessource, uriInfoName))
END
Versions 25 and later
iPhone/iPad
// Ouvre la fenêtre système pour la sélection d'une image ou d'un pdf
URISelect(MaProcURISélecteur, uriImage + TAB + "application/pdf")
 
INTERNAL PROCÉDURE MaProcURISélecteur(Succès is boolean, Résultat1 is URI)
IF Succès = True THEN
// Affiche le nom de la ressource sélectionnée
ToastDisplay(URIGetInfo(Résultat1, uriInfoName))
END
END
New in version 25
iPhone/iPad
// Ouvre la fenêtre système pour la sélection d'une image ou d'un pdf
URISelect(MaProcURISélecteur, uriImage + TAB + "application/pdf")
 
INTERNAL PROCÉDURE MaProcURISélecteur(Succès is boolean, Résultat1 is URI)
IF Succès = True THEN
// Affiche le nom de la ressource sélectionnée
ToastDisplay(URIGetInfo(Résultat1, uriInfoName))
END
END
iPhone/iPad
// Ouvre la fenêtre système pour la sélection d'une image ou d'un pdf
URISelect(MaProcURISélecteur, uriImage + TAB + "application/pdf")
 
INTERNAL PROCÉDURE MaProcURISélecteur(Succès is boolean, Résultat1 is URI)
IF Succès = True THEN
// Affiche le nom de la ressource sélectionnée
ToastDisplay(URIGetInfo(Résultat1, uriInfoName))
END
END
Syntax
AndroidAndroid Widget

Select an Resource (synchronous code) Hide the details

<Result> = URISelect([<MIME types>])
<Result>: URI variable
  • URI that corresponds to the selected resource.
  • The ErrorOccurred variable is set to True if an error occurs. To get the details of the error, use ErrorInfo.
<MIME types>: Optional character string or constant
  • List of MIME types of selectable files, separated by TAB.
  • One of the following specific constants:
    uriAudioAllows all types of audio files.
    uriImageAllows all types of image files.
    uriVideoAllows all types of video files.

    Remark: It is possible to concatenate constants by separating them with TAB.
If a specified MIME type is not known by the system, it will be ignored.
If this parameter is not specified, all files will be selectable.
AndroidAndroid Widget On Android, files that do not match the specified MIME types will still be visible but the user will not be able to select them.
Versions 25 and later
AndroidAndroid Widget iPhone/iPad

Selecting a resource (asynchronous code) Hide the details

URISelect(<WLanguage procedure> [, <MIME types>])
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called for the selected file. This procedure is called when the user closes the URI selection window. For more details on this procedure, see Parameters of the procedure used by URISelect.
<MIME types>: Optional character string or constant
  • List of MIME types of selectable files, separated by TAB.
  • The following specific constants:
    uriAudioAllows all types of audio files.
    uriImageAllows all types of image files.
    uriVideoAllows all types of video files.

    Remark: It is possible to concatenate constants by separating them with TAB.
If a specified MIME type is not known by the system, it will be ignored.
If this parameter is not specified, all files will be selectable.
AndroidAndroid Widget On Android, files that do not match the specified MIME types will still be visible but the user will not be able to select them.
New in version 25
AndroidAndroid Widget iPhone/iPad

Selecting a resource (asynchronous code) Hide the details

URISelect(<WLanguage procedure> [, <MIME types>])
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called for the selected file. This procedure is called when the user closes the URI selection window. For more details on this procedure, see Parameters of the procedure used by URISelect.
<MIME types>: Optional character string or constant
  • List of MIME types of selectable files, separated by TAB.
  • The following specific constants:
    uriAudioAllows all types of audio files.
    uriImageAllows all types of image files.
    uriVideoAllows all types of video files.

    Remark: It is possible to concatenate constants by separating them with TAB.
If a specified MIME type is not known by the system, it will be ignored.
If this parameter is not specified, all files will be selectable.
AndroidAndroid Widget On Android, files that do not match the specified MIME types will still be visible but the user will not be able to select them.
AndroidAndroid Widget iPhone/iPad

Selecting a resource (asynchronous code) Hide the details

URISelect(<WLanguage procedure> [, <MIME types>])
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called for the selected file. This procedure is called when the user closes the URI selection window. For more details on this procedure, see Parameters of the procedure used by URISelect.
<MIME types>: Optional character string or constant
  • List of MIME types of selectable files, separated by TAB.
  • The following specific constants:
    uriAudioAllows all types of audio files.
    uriImageAllows all types of image files.
    uriVideoAllows all types of video files.

    Remark: It is possible to concatenate constants by separating them with TAB.
If a specified MIME type is not known by the system, it will be ignored.
If this parameter is not specified, all files will be selectable.
AndroidAndroid Widget On Android, files that do not match the specified MIME types will still be visible but the user will not be able to select them.
Remarks

Various

  • To manage the URI returned by URISelect, use the URIxxx functions.
  • AndroidAndroid Widget On Android, the URI returned by URISelect is valid only until the next restart of the device.
  • To retrieve additional information (name, size, MIME type) on the selected resource, use URIGetInfo.
  • AndroidAndroid Widget URISelect is available only for devices running Android 4.4 or later (API level 19).
    A fatal error occurs if the function is used with an earlier system version.
    To determine the version of Android the application is running on, use SysAndroidVersion.
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.
URISelect 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.
URISelect 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.
URISelect 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.
Business / UI classification: UI Code
Component: wd260java.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment