PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

New WINDEV, WEBDEV, WINDEV Mobile 25 feature!
  • Application in "device owner" mode
  • Availability of the function
  • Running processes containing compilation errors
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
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,
  • modify global settings (Wi-Fi access, Bluetooth),
  • define security policies,
  • hide applications,
  • switch to kiosk mode without the user being able to exit it.
    See Application in kiosk mode for more details.
Example
// If the application is "device owner", it is switched to kiosk mode
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>/fr.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.

Availability of the function

InDeviceOwnerMode is available for all the products to allow for a multi-product 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 : wd250java.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment