To provide your app with the necessary device permissions, you need to declare what permissions you require. If your license key supports your declared permissions, it will grant them to you after being activated.

To find the full list of license permissions you can use for Android and Tizen apps, see License permissions. Copy the permissions you need into your manifest file to declare them.

Declaring permissions on Android

Declare the permissions you require in your AndroidManifest.xml file. The code below is an example you can follow. Remember to declare the permissions switch enclosed in a <meta-data /> tag.

<?xml version=”1.0” encoding=”utf-8”?>
<manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”com.samsung.knoxsdksample”>

    <!-- Declare Knox permissions required by this app -->
    <uses-permission android:name="com.samsung.android.knox.permission.KNOX_HW_CONTROL" />

    <!-- Declare Android permissions required by this app -->
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />

    <!-- Mandatory: Declare the <meta-data /> permissions switch to enable Knox permissions -->
    <application>
        <meta-data android:name="com.samsung.knoxlicense.permissions" android:value="true" />
        …
    </application>
</manifest>

Declaring permissions on Tizen

Declare the permissions (known as privileges in Tizen) you require in your tizen-manifest.xml file. For more information about which permissions to declare, see Add Privileges.

The code below is an example you can follow.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<manifest xmlns="http://tizen.org/ns/packages" api-version="4.0" package="org.example.wearablecustom" version="2.3.0">
    <author email="hello@company.com">Hello World</author>
    <description>...</description>
    <profile name="wearable"/>
    <ui-application appid="org.example.wearablecustom" exec="knox_demo_app" multiple="false"
        nodisplay="false" taskmanage="true" type="capp">
        <label>Demo App</label>
        <icon>demo.png</icon>
    </ui-application>

    <!-- Declare Tizen permissions (privileges) required by this app -->
    <privileges>
        <privilege>http://developer.samsung.com/tizen/privilege/knoxcustom.prokiosk</privilege>
        <privilege>http://developer.samsung.com/tizen/privilege/mdm.bluetooth</privilege>
    </privileges>

    <feature name="http://tizen.org/feature/screen.size.all">true</feature>
    <feature name="http://tizen.org/feature/screen.shape.circle">true</feature>
</manifest>