AsReaderSDK

The AsReaderSDK class serves as the main entry point of the SDK. From this class, you can access each manager (DeviceManager, RFIDManager, etc.) and control the overall SDK operations.


getInstance

Retrieves the instance of AsReaderSDK. This method follows the Singleton design pattern.

public static AsReaderSDK getInstance()

Return Value

Type

Description

AsReaderSDK

Instance object of the AsReaderSDK class

Sample Code

AsReaderSDK asReader = AsReaderSDK.getInstance();

getDeviceManager

Retrieves the instance of DeviceManager.

public DeviceManager getDeviceManager()

Return Value

Type

Description

DeviceManager

Instance object of the DeviceManager class

Sample Code

DeviceManager deviceManager = AsReaderSDK.getInstance().getDeviceManager();

initialize

Initializes the SDK. This method must be called when the application starts.

public void initialize(Context context)

Parameters

Name

Type

Description

context

Context

Application or Activity context

Sample Code

AsReaderSDK.getInstance().initialize(this);

getRFIDManager

Retrieves the instance of RFIDManager.

public RFIDManager getRFIDManager()

Return Value

Type

Description

RFIDManager

Instance object of the RFIDManager class

Sample Code

RFIDManager rfidManager = AsReaderSDK.getInstance().getRFIDManager();

setLogLevel

Sets the log level.

public void setLogLevel(LogLevel level)

Parameters

Name

Type

Description

level

LogLevel

One of the enumeration values from LogLevel

Sample Code

AsReaderSDK.getInstance().setLogLevel(LogLevel.Debug);

getLogLevel

Retrieves the currently set log level.

public LogLevel getLogLevel()

Return Value

Type

Description

LogLevel

Enumeration type LogLevel

Sample Code

LogLevel logLevel = AsReaderSDK.getInstance().getLogLevel();

setLog

Enables or disables SDK log output.

public void setLog(boolean enable)

Parameters

Name

Type

Description

enable

boolean

true: Enable / false: Disable

Sample Code

AsReaderSDK.getInstance().setLog(true);

removeSDKLog

Deletes all previously output SDK logs.

public void removeSDKLog()

Sample Code

AsReaderSDK.getInstance().removeSDKLog();