Since: API level 34
public static class

KnoxContract.License

extends Object
java.lang.Object
   ↳ com.samsung.android.knox.ex.KnoxContract.License

Deprecated in API level 37

Class Overview

This class provide active/deactive/get status for license.



    Param
    KEY License key

Usage
 Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/license");
 ContentValues contentValues = new ContentValues();
 contentValues.put("key", "YOUR_LICENSE_NUMBER");
 String selection = "key=?";
 String[] selectionArgs = new String[] {""};
 mContext.getContentResolver().update(uri, contentValues, selection, selectionArgs);

 Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/license");
 String selection = "key=?";
 String[] selectionArgs = new String[] {""};
 Cursor cursor = mContext.getContentResolver().query(uri, null, selection, selectionArgs, null);
 boolean isLicenseActivated = false;
 if (cursor != null) {
     cursor.moveToFirst();
     isLicenseActivated = Boolean.parseBoolean(cursor.getString(0));
 }

 Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/license");
 String selection = "key=?";
 String[] selectionArgs = new String[] {"YOUR_LICENSE_NUMBER"};
 mContext.getContentResolver().delete(uri, selection, selectionArgs);
 
Since
API level 34
Knox 3.7.1
Permission
Permission is not required

Summary

Constants
String CONTENT_URI_STRING
String PATH
Fields
public static final String LICENSE_PERMISSION
public static final String RUNTIME_PERMISSION
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String CONTENT_URI_STRING

Since: API level 36

Constant Value: "content://com.samsung.android.knox.sdk/license"

public static final String PATH

Since: API level 36

Constant Value: "license"

Fields

public static final String LICENSE_PERMISSION

Since: API level 36

public static final String RUNTIME_PERMISSION

Since: API level 36