Since: API level 34
public class

KnoxAiManager

extends Object
java.lang.Object
   ↳ com.samsung.android.knox.ex.knoxAI.KnoxAiManager

Deprecated in API level 37

Class Overview

Class of managing Knox AI.

Since
API level 34
KNOX 3.7.1

Summary

Nested Classes
enum KnoxAiManager.ErrorCodes Deprecated in API level 37  
Public Methods
KnoxAiSession createKnoxAiSession()
Deprecated in API level 37
KnoxAiManager.ErrorCodes destroyKnoxAiSession(KnoxAiSession session)
Deprecated in API level 37
static KnoxAiManager getInstance(Context context)
Deprecated in API level 37
void getKeyProvisioning(KeyProvisioningResultCallback cb)
Deprecated in API level 37
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public KnoxAiSession createKnoxAiSession ()

Since: API level 34

Deprecated in API level 37

Creates a session for getting secure Knox AI session handle.

Returns
  • Returns session handle - KnoxAiSession
Throws
SecurityException
Usage
Called before any other Knox AI APIs for AI operations.
     KnoxAiManager knoxAiManager = KnoxAiManager.getInstance(context);
     KnoxAiSession session = knoxAiManager.createKnoxAiSession();
     if(session == null) {
         Log.i(TAG, "Knox AI Session creation failed");
     }
 
Permission
com.samsung.android.knox.permission.KNOX_NDA_AI
Since
API level 34
KNOX 3.7.1
Multiuser Environment
User Scope

public KnoxAiManager.ErrorCodes destroyKnoxAiSession (KnoxAiSession session)

Since: API level 34

Deprecated in API level 37

Destroys instance of Knox AI session handle.

Throws
SecurityException
Usage
Called to destroy the current session after all AI operations are completed.
         knoxAiManager.destroyKnoxAiSession(session);
 
Permission
com.samsung.android.knox.permission.KNOX_NDA_AI
Since
API level 34
KNOX 3.7.1
Multiuser Environment
User Scope

public static KnoxAiManager getInstance (Context context)

Since: API level 34

Deprecated in API level 37

Returns
  • KnoxAiManager instance.
Since
API level 34
KNOX 3.7.1

public void getKeyProvisioning (KeyProvisioningResultCallback cb)

Since: API level 34

Deprecated in API level 37

Provision Device Encryption Key(DEK) from Server for KnoxAI ML Model Protection.

Throws
SecurityException
Usage
Called before any other Knox AI APIs for AI operations , if Device is not provisioned or on receipt of DEVICE_NOT_PROVISIONED error.
 // A KeyProvisioningResultCallback object should be provided to handle the result.
 KeyProvisioningResultCallback cb = new KeyProvisioningResultCallback() {
     void onFinished(KnoxAiManager.ErrorCodes result) { // check status here, DEVICE_PROVISION_FAILED on error.
     }
 }
 KnoxAiManager knoxAiManager = KnoxAiManager.getInstance(context);
 knoxAiManager.getKeyProvisioning(cb); //Result will be available onFinished() of KeyProvisioningResultCallback.
 
 
Permission
com.samsung.android.knox.permission.KNOX_NDA_AI
Since
API level 34
KNOX 3.7.1
Multiuser Environment
User Scope