With Embarcadero Delphi, this FireMonkey template demonstrates the new Android Kiosk Mode introduced in Android 6.0. Kiosk mode (lock mode) is a distinct application mode. These applications cannot be closed.
In this post, you’ll learn how to easily deploy advanced Android kiosk mode with the help and use of Android App Builder Software.
The purpose of this template is
- Demonstration of launching applications in Kiosk Mode;
- Make a simple, understandable mechanism for implementing the operation of the mode in any application.
All implementation of the mode is in the KioskApplication.pas module
- StartLockTask (AOtherAppPackages: TArrayOfStrings = []) – starts Kiosk Mode. AOtherAppPackages – accepts an array of strings, package names of external applications that need access from your application.
- Example: StartLockTask ([‘com.android.settings’]);
- StopLockTask – turns off Kiosk Mode;
- CleanOwnerState – Clears the status of the application as the current owner of the device.
Create an instance of the TKioskApplication class and call StartLockTask after the application starts. It is also necessary to make a condition for exiting the application (for example, entering a password). Before closing the application, call StopLockTask.
You can get this FireMonkey template from GetIt Package Manager
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition