1

While implementing the kiosk mode setup using the Android management API, I encountered a successful implementation. However, I now need to configure the display screen orientation for the kiosk mode.

here is my PolicyJson

{
  "applications": [
    {
      "defaultPermissionPolicy": "GRANT",
      "installType": "FORCE_INSTALLED",
      "packageName": "com.google.android.apps.tachyon"
    },
    {
      "packageName": "com.google.youtube",
      "installType": "KIOSK"
    }
  ],

  "systemUpdate": {
    "type": "WINDOWED",
    "startMinutes": 120,
    "endMinutes": 240
  },
  "appAutoUpdatePolicy": "ALWAYS",
  "bluetoothContactSharingDisabled": true,
  "bluetoothDisabled": true,
  "bluetoothConfigDisabled": true,
  "advancedSecurityOverrides": {
    "developerSettings": "DEVELOPER_SETTINGS_ALLOWED"
  },
  "policyEnforcementRules": [
    {
      "settingName": "passwordPolicies",
      "blockAction": {
        "blockAfterDays": 1
      },
      "wipeAction": {
        "wipeAfterDays": 30
      }
    }
  ]
}

Could someone please provide guidance or instructions on how to accomplish this task?

maranR
  • 363
  • 8

1 Answers1

0

While configuring the display screen orientation directly through the API is not currently supported, you can achieve a workaround by enabling the auto-rotate mode setting before applying the Kiosk policy.

By enabling the ’auto-rotate mode’ on the device, the application will automatically adjust its orientation based on the device's orientation. This way, the application will adapt to the screen orientation without explicitly configuring it through the API.

Here are the steps you can follow:

  1. Enable the auto rotate mode setting before applying the Kiosk policy. This can be done through the device's system settings.
  2. Rotate the device to the preferred orientation.
  3. Apply the Kiosk policy using the Android Management API, as you have already implemented.
  4. With the auto-rotate mode enabled, the application installed in Kiosk mode will automatically adjust its orientation based on the device's orientation.

This workaround ensures that the application within the Kiosk mode adapts to the screen orientation without the need for explicit configuration through the Android Management API.

If you are the developer of the application, you can also configure the app to use portrait or landscape orientation - more here