ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Mobile specific functions / Kiosk functions
  • Kiosk mode
  • Specific features
  • 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
Switches the current Android application to kiosk mode. In this mode, users' actions are limited:
  • users are prevented from leaving the application,
  • users cannot run other applications,
  • users cannot access the device settings,
  • users do not see or receive notifications or calls.
Reminder: An application in kiosk mode is one that the user can't quit on his own. When an application is in kiosk mode, user actions are limited. For more details, see Application in kiosk mode.
Example
// Passe l'application en cours en mode kiosque
KioskEnable()
Syntax
KioskEnable()
Remarks

Kiosk mode

  • The application must be in the foreground to be able to switch to kiosk mode.
  • If the application uses simple kiosk mode (without Device owner), a confirmation message is displayed when the kiosk mode is enabled. The user can exit this mode by simultaneously pressing the "Back" and "Recent" buttons.
  • If the application uses full kiosk mode (Device owner), the confirmation message is not displayed and the user cannot exit kiosk mode. To learn more about device owner applications, see Application in kiosk mode.
  • InKioskMode allows you to find out whether the application is currently in kiosk mode.
  • When kiosk mode is enabled:
    • The "Home" and "Recent" buttons are disabled.
    • Notifications are not displayed (even those sent by the application).
    • It is not possible to launch a third-party application (functions ShellExecute, AlbumPicker, StartShare, ... will fail).
    • The system bar is empty. Time, battery information and other system details are not displayed.
    • You can still change the volume or turn off the device.
  • To exit kiosk mode, the application must call KioskDisable.

Specific features

  • KioskEnable has no effect in the simulator.
  • If the device restarts, the kiosk mode will not be kept the next time the application is launched. You can:
    • call KioskEnable in the "Initialization" event of the project.
    • set the application to be launched at startup (in the Android application creation wizard) so that the application automatically returns to kiosk mode in case of restart.
  • KioskEnable is only available on devices running Android 5.0 or later (API level 21).
    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.
Android

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.
KioskEnable 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.
Minimum version required
  • Version 25
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help