ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Date and time functions
  • Application in the background: Specific case from Android 10
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
TimePicker (Function)
In french: HeureSélecteur
Opens the system time picker.
Time picker
Note: To select a time using the roller, it is advisable to directly use the "Time Roller" input mask for the input field of type "Time". This input mask is also available for iPhone/iPad applications.
Example
h is Time = TimePicker()
HeureDébut is Time = "0730"
HeureSélectionnée is Time = TimePicker(HeureDébut, True, "Saisissez l'heure d'arrivée")
Syntax
<Result> = TimePicker([<Initial time> [, <24-hour mode> [, <Title>]]])
<Result>: Time or character string
  • Time selected in the picker,
  • Empty string ("") if the selection was canceled by the user.
<Initial time>: Time or optional character string
Time displayed when the picker is opened. If this time is not specified, the picker will display the current time.
<24-hour mode>: Optional boolean
  • True (default) to display the time in 24-hour format.
  • False to display the time in AM/PM format.
<Title>: Optional character string
Title that must be displayed in the picker. If this parameter is not specified, the title will be the time displayed in the picker in text format.
Remarks
AndroidAndroid Widget

Application in the background: Specific case from Android 10

Starting with Android 10, it is no longer possible to open a window when the application is in the background.
TimePicker 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.
Component: wd300android.jar
Minimum version required
  • Version 17
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help