KEYCODE_BACK event doesn’t work with Knox APIs on Android 16 and higher

Last updated August 12th, 2025

Environment

  • Knox SDK
  • Devices running Android 16 and higher

Overview

On devices running Android 16 OS and higher, you may notice that KeyEvent.KEYCODE_BACK isn’t working as intended with your setHardKeyIntentBroadcast, allowHardwareKeys, and setHardkeyIntentState(int state) Knox API methods.

Predictive back feature enabled on Android 16

Starting with Android 16, a predictive back system feature is enabled by default. With this feature enabled, onBackPressed isn’t called and KeyEvent.KEYCODE_BACK doesn’t dispatch anymore.

Due to this change, Knox API methods using KeyEvent.KEYCODE_BACK no longer work.

Is this page helpful?