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 / Windows functions / Miscellaneous WINDEV functions
  • Application in "device owner" mode
  • Function availability
  • Running processes containing compilation errors
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Indicates whether the Android application is in "Device owner" mode.
An Android application in device owner mode has higher privileges than a standard application. This application can perform operations usually reserved for system applications (provided they are declared):
  • create users,
  • change global settings (Wi-Fi access, Bluetooth),
  • define security policies,
  • hide applications,
  • switch to kiosk mode and prevent the user from exiting.
    For more details, see Application in kiosk mode.
Example
// Si l'application est "device owner", on la passe en mode kiosque
IF InDeviceOwnerMode() THEN
	KioskEnable()
END
Syntax
<Result> = InDeviceOwnerMode()
<Result>: Boolean
  • True if the application is "device owner",
  • False otherwise.
Remarks

Application in "device owner" mode

To set a WINDEV Mobile application as "device owner":
  • Check "Device management application (can become "device owner" for the kiosk mode)" in the Android project configuration description.
  • After installing the application on the desired workstation, run the following ADB command for the device on which the application is installed:
    adb shell dpm set-device-owner
    <package>/com.pcsoft.wdjava.core.application.WDDeviceAdminReceiver
    where:
    <Package> corresponds to the package name of your Android application.
    This command creates an entry in the "/data/system/ device_owner.xml" file which references the application as "device owner".
Remarks:
  • There can only be one device owner application per device and this operation is only possible if no user has been configured on the device. Otherwise, it is necessary to delete all users before running the command.
  • Once an application has been set as "device owner", it is no longer possible to disable this mode or even delete the application. Only a factory reset can delete the application.
  • To update an application in device owner mode, it is necessary to sign it with the same key used to enable the mode.

Function availability

InDeviceOwnerMode can be used in all IDEs to allow for cross-platform code. Functions or procedures that use InDeviceOwnerMode can be shared between several products without generating any compilation error.

Running processes containing compilation errors

By default, the security mechanism of WLanguage is triggered only if the line containing the compilation error is run.
For example, if a function not allowed in the current product is found in a loop (IF), the security mechanism of WLanguage will be triggered only if the line containing this function is run.
Component: wd300vm.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help