Old revisions Add to book Export to PDF Table of Contents SDK API initialize Parameters run Return Code getVersions Parameters Return Code getDeviceInfo Parameters Return Code setAutoStartApplication Return Code connectFtpServer Parameters Return Code disconnectFtpServer Return Code getFtpFileList Parameters Return Code getUsbFileList Parameters Return Code upgradeFirmware Parameters Return Code rebootDevice Return Code Book Creator Add this page to your book Book Creator Remove this page from your book Manage book (0 page(s)) Help SDK API initialize Initialize the SDK. void initialize(Context context, DeviceListener listener) Parameters context : application context. listener : A callback listener that receives callback data from the device. Refer to DeviceListener Class 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 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. getVersions Get the SDK/Firmware versions. int getVersions(Versions versions) Parameters versions : version information(SDK / Firmware / Fingerprint library / Card library) Refer to Version Class Return Code Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs. getDeviceInfo Get the device information. int getDeviceInfo(Device device) Parameters device : device information Refer to Device Class Return Code Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs. setAutoStartApplication 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. connectFtpServer connect to the FTP server. int connectFtpServer(FirmwareOption option) Parameters option: Firmware file option. Refer to FirmwareOption Class 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" /> disconnectFtpServer 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" /> getFtpFileList 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"/> getUsbFileList 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. upgradeFirmware Copy the upgrade file to the specified firmware file. int upgradeFirmware(FirmwareOption option) Parameters option: Firmware File Option Refer to FirmwareOption Class 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" /> rebootDevice 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.