# Device (/docs/settings/device)





## 1. Keep Screen On [#1-keep-screen-on]

Enable this option to keep your device awake (no screen timeout).

Useful if you have a kiosk application that should always remain active.

**Default:** false

## 2. Rotation [#2-rotation]

Select one of:

| Option | Orientation        | Description                                                                                                     |
| ------ | ------------------ | --------------------------------------------------------------------------------------------------------------- |
| Auto   | `unspecified`      | No preference specified: let the system decide the best orientation.                                            |
| 0°     | `portrait`         | Would like to have the screen in a portrait orientation: display taller than wide, ignoring sensor data.        |
| 90°    | `landscape`        | Would like to have the screen in a landscape orientation: display wider than tall, ignoring sensor data.        |
| 180°   | `reversePortrait`  | Would like to have the screen in portrait orientation, turned in the opposite direction from normal portrait.   |
| 270°   | `reverseLandscape` | Would like to have the screen in landscape orientation, turned in the opposite direction from normal landscape. |

For more details, refer to Android's official documentation for [R.attr.screenOrientation](https://developer.android.com/reference/android/R.attr#screenOrientation).

**Default:** Auto

## 3. Brightness [#3-brightness]

Set the app window brightness from 0 (very dim) to 100 (very dark).

Use -1 to disable (i.e. the system default brightness will be used).

**Default:** -1

## 4. Allow Camera [#4-allow-camera]

Set to true to give WebView access to your device's camera.

You will need to grant the [CAMERA](https://developer.android.com/reference/android/Manifest.permission#CAMERA)
permission, which is required for the WebView's
[RESOURCE\_VIDEO\_CAPTURE](https://developer.android.com/reference/android/webkit/PermissionRequest#RESOURCE_VIDEO_CAPTURE)
feature.

**Default:** false

## 5. Allow Microphone [#5-allow-microphone]

Set to true to give WebView access to your device's microphone.

You will need to grant the
[RECORD\_AUDIO](https://developer.android.com/reference/android/Manifest.permission#RECORD_AUDIO)
permission, which is required for the WebView's
[RESOURCE\_AUDIO\_CAPTURE](https://developer.android.com/reference/android/webkit/PermissionRequest#RESOURCE_AUDIO_CAPTURE)
feature.

**Default:** false

## 6. Allow Location [#6-allow-location]

When enabled, websites can request the device's location.

You can choose to request precise location (FINE) or approximate location (COARSE).

For more information, refer to
[location/permissions#accuracy](https://developer.android.com/develop/sensors-and-location/location/permissions#accuracy).

You will need to grant either
[ACCESS\_FINE\_LOCATION](https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION)
or
[ACCESS\_COARSE\_LOCATION](https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION),
required for the WebView's
[GeolocationPermissions](https://developer.android.com/reference/android/webkit/GeolocationPermissions).

**Default:** false

## 7. Allow NFC [#7-allow-nfc]

Set to true to enable NFC support in Webview Kiosk via a Web NFC compatibility bridge.

This allows websites to read and write NFC tags using the device's NFC hardware.

Please note that this does not use Web NFC directly, as Web NFC is not yet
available in Android System WebView. Instead, a compatibility layer is provided
between native NFC and JavaScript. As a result, it is not subject to the same
[security limitations](https://developer.chrome.com/docs/capabilities/nfc#security-and-permissions)
as Web NFC and can also operate on insecure (non-HTTPS) websites.

**Default:** false

## 8. Allow Notifications [#8-allow-notifications]

Set to true to allow Webview Kiosk to send notifications. For example, this
will allow the MQTT notify command to create alerts.

You will need to grant the
[POST\_NOTIFICATIONS](https://developer.android.com/reference/android/Manifest.permission#POST_NOTIFICATIONS)
android permission.

Please note that for foreground services, e.g. when using lock task mode
kiosk-launch or MQTT, the notification will always be created irrespective
of this setting. You can disable notifications at the device level if you
do not want them.

**Default:** false

## 9. Back Button Hold Action [#9-back-button-hold-action]

Customise the behaviour when the back button is held down (long pressed).

| Option                     | Description                                                        |
| -------------------------- | ------------------------------------------------------------------ |
| `OPEN_KIOSK_CONTROL_PANEL` | See `Web Browsing -> Kiosk Control Panel Region` for more details. |
| `GO_HOME`                  | Navigates to the Home Screen.                                      |
| `DISABLED`                 | Do nothing (ignore long-press).                                    |

**Default:** Open Kiosk Control Panel

## 10. Custom Unlock Shortcut [#10-custom-unlock-shortcut]

Provide a custom keyboard shortcut using a modifier key (CTRL/SHIFT/ALT/META)
in combination with another standard key to unlock/unpin the application.

For example, `CTRL+1`.

This is useful for devices with no navigation buttons on screen and instead
has a physical keyboard connected.

**Default:*&#x2A; &#x2A;(blank)*

## 11. Custom Auth Password [#11-custom-auth-password]

Specify a custom password to protect your settings or when unlocking from
the kiosk state.

For user-owned devices that utilises
[screen pinning](https://developer.android.com/about/versions/lollipop/android-5.0#ScreenPinning),
this will only work if you are using an unlock method provided by the app.

Device-level unpin methods (e.g. gestures/holding overview + back button
simultaneously) will bypass this setting. To enhance security, please
refer to the [security](/docs/security) documentation.

Leave this setting blank to use your device's biometrics or credentials.

**Default:*&#x2A; &#x2A;(blank)*

## 12. Unlock Auth Requirement [#12-unlock-auth-requirement]

This setting only applies to in-app unlock methods, e.g. when unlocking
using `Kiosk Control Panel` or `Custom Unlock Shortcut`.

| Option  | Description                                                                                                                                 |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Default | Require authentication for lock task mode (device owner, fully-managed/company-owned devices), off for screen pinning (user-owned devices). |
| Off     | Unlock without requiring authentication.                                                                                                    |
| Require | Prompt for biometrics or device credentials when unlocking.                                                                                 |

For user-owned devices without lock task mode, the device will auto-lock when
unpinning, which is outside the control of Webview Kiosk.

**Default:** Default

## 13. Block Screen Capture [#13-block-screen-capture]

Prevent screenshots, screen recording and content previews in Recent Apps.
This is done by setting the FLAG\_SECURE window flag.

For more information, see
[Android Fraud Prevention: Secure Sensitive Activities](https://developer.android.com/security/fraud-prevention/activities).

**Default:** false

## 14. Block Volume Keys [#14-block-volume-keys]

Disable the volume control buttons, specifically:

* [KEYCODE\_VOLUME\_UP](https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VOLUME_UP)
* [KEYCODE\_VOLUME\_DOWN](https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VOLUME_DOWN)
* [KEYCODE\_VOLUME\_MUTE](https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VOLUME_MUTE)

**Default:** false

## 15. Device Owner [#15-device-owner]

For more information about `Device Owner`, see the [Security](/docs/security) documentation.

### 15.1. Lock Task Features [#151-lock-task-features]

Webview Kiosk The settings below are extracted from the official documentations:

* [Lock Task Mode -> Customise UI](https://developer.android.com/work/dpc/dedicated-devices/lock-task-mode#customize-ui)
* [DevicePolicyManager#LOCK\_TASK\_FEATURE\_BLOCK\_ACTIVITY\_START\_IN\_TASK](https://developer.android.com/reference/android/app/admin/DevicePolicyManager#LOCK_TASK_FEATURE_BLOCK_ACTIVITY_START_IN_TASK)

<table>
  <thead>
    <tr>
      <th>
        Feature
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        Show Home Button
      </td>

      <td>
        Shows the Home button. Enable for custom launchers—tapping an enabled
        Home button has no action unless you allowlist the default Android
        launcher.

        <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager#LOCK_TASK_FEATURE_HOME">
          LOCK\_TASK\_FEATURE\_HOME
        </a>
      </td>
    </tr>

    <tr>
      <td>
        Show Overview Button
      </td>

      <td>
        Shows the Overview button (tapping this button opens the Recents
        screen). If you enable this button, you must also enable the Home
        button.

        <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager#LOCK_TASK_FEATURE_OVERVIEW">
          LOCK\_TASK\_FEATURE\_OVERVIEW
        </a>
      </td>
    </tr>

    <tr>
      <td>
        Enable Global Actions
      </td>

      <td>
        Enables the global actions dialog that shows when long-pressing the
        power button. The only feature that's enabled when
        setLockTaskFeatures() hasn't been called. A user typically can't power
        off the device if you disable this dialog.

        <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager#LOCK_TASK_FEATURE_GLOBAL_ACTIONS">
          LOCK\_TASK\_FEATURE\_GLOBAL\_ACTIONS
        </a>
      </td>
    </tr>

    <tr>
      <td>
        Enable Notifications
      </td>

      <td>
        Enables notifications for all apps. This shows notification icons in
        the status bar, heads-up notifications, and the expandable notification
        shade. If you enable this button, you must also enable the Home button.
        Tapping notification actions and buttons that open new panels doesn't
        work in lock task mode.

        <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager#LOCK_TASK_FEATURE_NOTIFICATIONS">
          LOCK\_TASK\_FEATURE\_NOTIFICATIONS
        </a>
      </td>
    </tr>

    <tr>
      <td>
        Show System Info
      </td>

      <td>
        Enables the status bar's system info area that contains indicators such
        as connectivity, battery, and sound and vibrate options.

        <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager#LOCK_TASK_FEATURE_SYSTEM_INFO">
          LOCK\_TASK\_FEATURE\_SYSTEM\_INFO
        </a>
      </td>
    </tr>

    <tr>
      <td>
        Enable Keyguard
      </td>

      <td>
        Enables any lock screen that might be set on the device. Typically not
        suitable for devices with public users such as information kiosks or
        digital signage.

        <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager#LOCK_TASK_FEATURE_KEYGUARD">
          LOCK\_TASK\_FEATURE\_KEYGUARD
        </a>
      </td>
    </tr>

    <tr>
      <td>
        Block Activity Start in Task
      </td>

      <td>
        Enable blocking of non-allowlisted activities from being started into a
        locked task.

        This requires Android 11 (API level 30).

        <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager#LOCK_TASK_FEATURE_BLOCK_ACTIVITY_START_IN_TASK">
          LOCK\_TASK\_FEATURE\_BLOCK\_ACTIVITY\_START\_IN\_TASK
        </a>
      </td>
    </tr>
  </tbody>
</table>

### 15.2. Dhizuku Request Permission on Launch [#152-dhizuku-request-permission-on-launch]

When enabled, if [Dhizuku](https://github.com/iamr0s/Dhizuku) is installed and
has not granted Webview Kiosk access through the
[Dhizuku API](https://github.com/iamr0s/Dhizuku-API), prompt for permission.

**Default:** true
