public class

SecBiometricLicenseManager

extends Object
java.lang.Object
   ↳ com.sec.biometric.license.SecBiometricLicenseManager

Class Overview

This class provides APIs to activate ISV license on device

Summary

Constants
String ACTION_LICENSE_STATUS Broadcast Action : Sent to inform application about result of License activation or validation result.
int ERROR_INTERNAL Internal error.
int ERROR_INTERNAL_SERVER Internal server error.
int ERROR_INVALID_LICENSE Invalid license.
int ERROR_INVALID_PACKAGE_NAME Invalid package name.
int ERROR_LICENSE_TERMINATED License terminated.
int ERROR_NETWORK_DISCONNECTED Network disconnected.
int ERROR_NETWORK_GENERAL General network error.
int ERROR_NONE Success.
int ERROR_NOT_CURRENT_DATE Not current date.
int ERROR_NULL_PARAMS Null parameter.
int ERROR_UNKNOWN Unknown error.
int ERROR_USER_DISAGREES_LICENSE_AGREEMENT User disagrees License agreement.
String EXTRA_LICENSE_ERROR_CODE Used as an integer extra field with ACTION_LICENSE_STATUS.
String EXTRA_LICENSE_RESULT_TYPE Used as integer extra field with ACTION_LICENSE_STATUS.
String EXTRA_LICENSE_STATUS Used as string extra field with ACTION_LICENSE_STATUS.
int LICENSE_RESULT_TYPE_ACTIVATION Result Activation.
int LICENSE_RESULT_TYPE_VALIDATION Result Validation.
Public Methods
void activateLicense(String licenseKey, String pkgName)
API to activate ISV license.
static SecBiometricLicenseManager getInstance(Context context)
API to create an instance of SecBiometricLicenseManager class.
boolean isLicenseActivated()
API to check ISV license Activated.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ACTION_LICENSE_STATUS

Broadcast Action : Sent to inform application about result of License activation or validation result. This targeted broadcast is sent only to the application who calls the #activateLicense(String) API. Also system does periodic validation of ISV license, application continuously needs to listen for this intent after activation. The intent will have the following extra value:

EXTRA_LICENSE_STATUS:
"success", "fail".

EXTRA_LICENSE_ERROR_CODE:
ERROR_NONE
ERROR_NULL_PARAMS
ERROR_UNKNOWN
ERROR_INVALID_LICENSE
ERROR_LICENSE_TERMINATED
ERROR_INTERNAL
ERROR_INTERNAL_SERVER
ERROR_NETWORK_DISCONNECTED
ERROR_NETWORK_GENERAL
ERROR_USER_DISAGREES_LICENSE_AGREEMENT
ERROR_INVALID_PACKAGE_NAME
ERROR_NOT_CURRENT_DATE

EXTRA_LICENSE_RESULT_TYPE:
LICENSE_RESULT_TYPE_ACTIVATION
LICENSE_RESULT_TYPE_VALIDATION

Constant Value: "edm.intent.action.license.status"

public static final int ERROR_INTERNAL

Internal error.

Constant Value: 301 (0x0000012d)

public static final int ERROR_INTERNAL_SERVER

Internal server error.

Constant Value: 401 (0x00000191)

public static final int ERROR_INVALID_LICENSE

Invalid license.

Constant Value: 201 (0x000000c9)

public static final int ERROR_INVALID_PACKAGE_NAME

Invalid package name.

Constant Value: 204 (0x000000cc)

public static final int ERROR_LICENSE_TERMINATED

License terminated.

Constant Value: 203 (0x000000cb)

public static final int ERROR_NETWORK_DISCONNECTED

Network disconnected.

Constant Value: 501 (0x000001f5)

public static final int ERROR_NETWORK_GENERAL

General network error.

Constant Value: 502 (0x000001f6)

public static final int ERROR_NONE

Success.

Constant Value: 0 (0x00000000)

public static final int ERROR_NOT_CURRENT_DATE

Not current date.

Constant Value: 205 (0x000000cd)

public static final int ERROR_NULL_PARAMS

Null parameter.

Constant Value: 101 (0x00000065)

public static final int ERROR_UNKNOWN

Unknown error.

Constant Value: 102 (0x00000066)

public static final int ERROR_USER_DISAGREES_LICENSE_AGREEMENT

User disagrees License agreement.

Constant Value: 601 (0x00000259)

public static final String EXTRA_LICENSE_ERROR_CODE

Used as an integer extra field with ACTION_LICENSE_STATUS. Contains the error code of license activation or validation result.

Constant Value: "edm.intent.extra.license.errorcode"

public static final String EXTRA_LICENSE_RESULT_TYPE

Used as integer extra field with ACTION_LICENSE_STATUS. This will tell whether this is activation or validation result.

Constant Value: "edm.intent.extra.license.result_type"

public static final String EXTRA_LICENSE_STATUS

Used as string extra field with ACTION_LICENSE_STATUS. Contains the result of the license activation or validation result.

Constant Value: "edm.intent.extra.license.status"

public static final int LICENSE_RESULT_TYPE_ACTIVATION

Result Activation.

Constant Value: 800 (0x00000320)

public static final int LICENSE_RESULT_TYPE_VALIDATION

Result Validation.

Constant Value: 801 (0x00000321)

Public Methods

public void activateLicense (String licenseKey, String pkgName)

API to activate ISV license.

Parameters
licenseKey received from seap portal.
pkgName package name of the Admin app
Usage
Application can use this API to activate ISV license on device for accessing SDK APIs. SDK Framework will broadcast intent with action ACTION_LICENSE_STATUS with string EXTRA_LICENSE_STATUS, integer EXTRA_LICENSE_ERROR_CODE, integer EXTRA_LICENSE_RESULT_TYPE as extras in intent upon calling this API. This is a targeted broadcast intent, sent only to the application calling the activateLicense(String, String).

public static SecBiometricLicenseManager getInstance (Context context)

API to create an instance of SecBiometricLicenseManager class. This is a singleton class and you will be accessing the same object throughout the lifecycle of your app.

Parameters
context context of the application or service using this class
Returns
  • Returns the SecBiometricLicenseManager object, else null
Usage
Used to get access to SecBiometricLicenseManager object

 SecBiometricLicenseManager mgr = SecBiometricLicenseManager.getInstance(context);
 

public boolean isLicenseActivated ()

API to check ISV license Activated.

Usage
Application can use this API to check ISV license is activated on device for accessing SDK APIs. API will return true if license is activated else return false