Back to top

Activate the Knox Capture SDK license

Once you’ve obtained a Knox Capture SDK license, you’ll need to activate it. If you have not yet obtained a license key, please review Get a Knox Capture SDK license for more information.

You can activate the license with the activateLicense API.

After activating the license, you can check the results with the LicenseActivationCallback API.

These API methods are based on the KnoxEnterpriseLicenseManager API. For error information, see KnoxEnterpriseLicenseManager.

The following code snippet shows the API call used to activate the Knox SDK license:

val key: String = "YOUR_KNOX_LICENSE_KEY" //need to fill a valid license key

ScanLicenseClient.getScanLicense().activateLicense(context, key, object : LicenseActivationCallback {
    override fun onFail(errorCode : Int) {
        Log.d(TAG, "failed. ErrorCode : $errorCode")
    }
    override fun onSuccess() {
        Log.d(TAG, "succeeded.")
    }
})

Is this page helpful?