Since: API level 36
public interface

LicenseResultCallback

com.samsung.android.knox.license.LicenseResultCallback

Class Overview

Public interface to handle license activation/deactivation results.

Since
API level 35
KNOX 3.8

Public Methods

public abstract void onLicenseResult (LicenseResult result)

Since: API level 36

API callback for activateLicense(String, LicenseResultCallback), activateLicense(String, String, LicenseResultCallback), deActivateLicense(String, LicenseResultCallback), deActivateLicense(String, String, LicenseResultCallback), activateLicense(String, LicenseResultCallback) and activateLicense(String, String, LicenseResultCallback), invoked after license activation or deactivation is completed.

 public void onLicenseResult(LicenseResult licenseResult) {
    if (licenseResult.isSuccess()) {
        if (licenseResult.isActivation()) {
            Log.i(TAG, licenseResult.getLicenseKey() + " activated successfully");
            for (String permission : licenseResult.getGrantedPermissions()) {
                Log.i(TAG, permission + " granted");
            }
        } else {
            Log.i(TAG, licenseResult.getLicenseKey() + " deactivated successfully");
        }
    } else {
        Log.e(TAG, "Error during " + licenseResult.getType() + " of license key " +
        licenseResult.getLicenseKey() + " with error code: " + licenseResult.getErrorCode());
    }
 }
 

Since
API level 35
KNOX 3.8
See Also