PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
  • Operating mode
  • Specific features for iPhone/iPad
  • Specific features for Android
  • Application in the background: Android 10 specific case
  • Required application feature
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
Retrieves a photo, an image or a video stored in the photo album of the mobile device.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
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
// Select the image
bRes is boolean
bRes = AlbumPicker(AlbumPicker_Callback)
 
INTERNAL PROCEDURE AlbumPicker_Callback(sImagePath = "")
IMG_MyImage = sImagePath
END
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App
// Select the image
ImagePath is string
ImagePath = AlbumPicker()
IF ImagePath = "" THEN
Error(ErrorInfo())
RETURN
END
IMG_MyImage = ImagePath
Syntax
Not available in iOS Widget mode

Selecting an element in the album: path returned directly Hide the details

<Result> = AlbumPicker([<Type to retrieve>])
<Result>: Character string
  • Full path of the file where the photo or the image was saved,
  • Empty string ("") if an error occurred. To find out the error details, use ErrorInfo.
<Type to retrieve>: Optional Integer constant
Type of element that will be retrieved in the album:
albumImage
(Default value)
Select an image in the album.
albumVideoSelect a video in the album.
Remark: these constants cannot be combined. A single type can be selected during the call to the function.

Selecting an element in the album: path retrieved in a procedure Hide the details

<Result> = AlbumPicker([<Type to retrieve>, ] <WLanguage procedure>)
<Result>: Boolean
  • True if the image or the video was selected,
  • False otherwise.
<Type to retrieve>: Integer constant
Type of element that will be retrieved in the album:
albumImage
(Default value)
Select an image in the album.
albumVideoSelect a video in the album.
Remark: these constants cannot be combined. A single type can be selected during the call to the function.
<WLanguage procedure>: Procedure name
Name of WLanguage procedure run during the selection in the album. This procedure has the following format:
PROCEDURE <Procedure name>(<Path>)
This procedure is used to retrieve the save path of the selected image or video.
Remarks

Operating mode

During the call to AlbumPicker, the user selects the requested image among the images displayed in a specific window.
Once the choice is validated, the selected image is saved:
  • AlbumPicker returns the photo save path so that it can be handled (syntax 1).
  • the specified WLanguage procedure is used to find out the photo save path so that it can be handled (syntax 2).
iPhone/iPad

Specific features for iPhone/iPad

The images, photos and videos retrieved by this function are copied into the "temp" directory of the application. Don't forget to delete these copies if necessary.
AndroidAndroid Widget

Specific features for Android

  • Selecting an image: the selected image is copied into the current directory of application, returned by fCurrentDir. The returned path corresponds to the path of this copy. Don't forget to delete this copy if necessary.
  • Selecting a video: the video is not copied into the directory of the application. The returned path corresponds to the initial location of the video.
Versions 25 and later
AndroidAndroid Widget

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
AlbumPicker 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). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
New in version 25
AndroidAndroid Widget

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
AlbumPicker 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). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
AndroidAndroid Widget

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
AlbumPicker 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). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
Versions 21 and later
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required features:
  • Video library.
  • Image library.
New in version 21
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required features:
  • Video library.
  • Image library.
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required features:
  • Video library.
  • Image library.
Component : wd260android.aar
Minimum version required
  • Version 17
This page is also available for…
Comments
Error on this function
Very frustrating error when using this function in Windev Mobile 25. It is changing me the path to the datafiles. After using it, al files start to bein created at the path where i Uploaded the picture. Very anoying please a solution
Aldo Vargas
29 Jul. 2020