SDK API

Initialize the SDK.

void initialize(Context context, DeviceListener listener) 

Parameters

  • context : application context.
  • listener : A callback listener that receives callback data from the device.
If this function is not called, the SDK will not work properly.
It should be called as soon as possible after running the application.


Run the SDK service.

int run()

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.

The SDK was developed for use with a single application.
It requires caution because it is not used concurrently in other applications.


Get the SDK/Firmware versions.

int getVersions(Versions versions)

Parameters

  • versions : version information(SDK / Firmware / Fingerprint library / Card library)

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.


Get the device information.

int getDeviceInfo(Device device)

Parameters

  • device : device information

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.


Automatically launch the application when Android starts.

int setAutoStartApplication(boolean enable)

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.


connect to the FTP server.

int connectFtpServer(FirmwareOption option)

Parameters

  • option: Firmware file option.

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.

To use the firmware upgrade function, you need to build an FTP server.
The API acts as an FTP client.

To use the API, Android applications require the following permissions:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


Disconnects to the FTP server.

int disconnectFtpServer()

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.

To use the firmware upgrade function, you need to build an FTP server.
The API acts as an FTP client.

To use the API, Android applications require the following permissions:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


Get a list of file names for the FTP server.

int getFtpFileList(ArrayList<String> fileList)

Parameters

  • fileList: List of file names

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.

To use the firmware upgrade function, you need to build an FTP server.
The API acts as an FTP client.

To use the API, Android applications require the following permissions:
<uses-permission android:name="android.permission.INTERNET"/>


Get a list of firmware file names for USB.

int getUsbFileList(ArrayList<String> fileList)

Parameters

  • fileList: file name list

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.


Copy the upgrade file to the specified firmware file.

int upgradeFirmware(FirmwareOption option)

Parameters

  • option: Firmware File Option

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.

To use the firmware upgrade function, you need to build an FTP server.
The API acts as an FTP client.

To use the API, Android applications require the following permissions:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


Reboot the device.

int rebootDevice()

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.

The firmware will be upgraded at device reboot.