Getnet DocsGetnet Docs

Configuring Terminal Kiosk Mode

This guide explains how to use PeripheralsLib to configure “Kiosk Mode” settings on the terminal. This allows you to restrict user navigation and set a default launcher application.

These configurations can block normal device usage (e.g., hiding navigation bars). Always ensure you have a mechanism within your app to disable these restrictions or an alternative method to exit the application during development.

Configuration Object: MSG8210

Configuration is managed via the MSG8210 object. You must set the properties of this object before passing it to the manager.

Properties

PropertyTypeDescriptionMandatory?
launcherAppPackageStringPackage ID of the app to set as the default launcher.No (can be null)
launcherAppActivityStringMain Activity class name (Format: Package.Activity).No (can be null)
enableStatusBarBooleanIf false, the status bar (top) cannot be expanded.Yes
enableNavigationBarBooleanIf false, navigation buttons (bottom) are disabled.Yes
showStatusBarBooleanIf false, the status bar is hidden from the screen.Yes
showNavigationBarBooleanIf false, the navigation bar is hidden from the screen.Yes

Applying Configuration

Use the configTerminal method to apply the settings defined in the MSG8210 object.

// 1. Create and configure the settings object
MSG8210 config = new MSG8210();

// Set the default launcher (Optional)
config.launcherAppPackage = "com.mycompany.posapp";
config.launcherAppActivity = "com.mycompany.posapp.MainActivity";

// Configure UI restrictions (Mandatory)
config.enableStatusBar = false;   // Prevent pulling down notifications
config.enableNavigationBar = false; // Disable back/home/recent buttons
config.showStatusBar = false;     // Hide top bar
config.showNavigationBar = false; // Hide bottom bar

// 2. Apply configuration
manager.configTerminal(config, new ConfigCallback() {
    @Override
    public void onSuccess() {
        Log.d("KioskMode", "Terminal configured successfully.");
    }

    @Override
    public void onError(int errorCode) {
        Log.e("KioskMode", "Configuration failed. Code: " + errorCode);
    }
});

Troubleshooting Configuration Errors

If the configuration fails, the onError callback will return one of the following codes:

CodeMeaningAction
-1Configuration ErrorCheck if your MSG8210 parameters are valid.
-2Not SupportedThe terminal model or OS version does not support these settings.
-3Communication ErrorRetry the operation.
-99IndeterminateUnknown error. Check system logs.