Declare Knox permissions
Last updated July 17th, 2025
With Knox v3.0, we introduced selective permissions so that you can declare only the permissions that your app uses. This topic shows you how to declare these permissions, and how to handle app permissions dynamically at runtime instead of prompting the user when the application is installed.
Selective permissions allow you to present app users with a simple dialog listing only the permissions needed to run your app. The Knox system grants your app access to only the permissions you declare in your Android manifest.
Declare permissions
To use selective permissions:
-
Find your required Knox permissions in the API reference. For example, Knox Peripheral APIs require the permission
com.samsung.android.knox.permission.KNOX_NDA_PERIPHERAL_RT
. -
Update the Android manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.samsung.knoxsdksample">
<!-- Declare the Knox permissions used by this app -->
<uses-permission android:name="com.samsung.android.knox.permission.KNOX_NDA_PERIPHERAL_RT"/>
<application>
<!-- Enable the selective Knox permissions -->
<meta-data android:name="com.samsung.knoxlicense.permissions" android:value="true"/>
</application>
</manifest>
To check for a permission at runtime, and request it if it isn’t yet granted:
private static final String NON_DA_RUNTIME_PERMISSION =
"com.samsung.android.knox.permission.KNOX_NDA_PERIPHERAL_RT";
if (ContextCompat.checkSelfPermission(mContext, NON_DA_RUNTIME_PERMISSION) != PackageManager.PERMISSION_GRANTED) {
requestPermissions(new String[] {
NON_DA_RUNTIME_PERMISSION
}, 0);
}
See also:
On this page
Is this page helpful?