Professional Documents
Culture Documents
SDK Guide of Android Onepass App
SDK Guide of Android Onepass App
Abstract
This document provides the guide of the SDK for further development.
www.hfteco.com
Preface
Important Claim:
Not all the functions in the source code can be applied to all
types of the product depending on the hardware of the device.
The update modules might cause the compatible problem.
Although the SDK is provided freely, our company still hold
all the right of the source code.
Without permission of our company, any individual,
companies and organizations cannot amend, copy or excerpt
content of the SDK.
Any development of using the SDK should be legal under the
local law.
Contents
Preface................................................................................................... 1
Contents.............................................................................................. 2
1. Introduction...................................................................................... 3
2. The package of android................................................................... 4
2.1. The MtGpio class file in fpi........................................................4
2.2. scanner........................................................................................ 4
2.2.1. camera................................................................................... 5
2.2.2. common.................................................................................5
2.2.3. config.....................................................................................6
2.2.4. decode................................................................................... 6
2.2.5. view....................................................................................... 6
2.3. zyapi............................................................................................7
3. The package of android_serialport_api.......................................... 8
4. The package of com.fgtit..................................................................9
4.1. app...............................................................................................9
4.2. device........................................................................................11
4.3. fingermap..................................................................................11
4.4. fpcore........................................................................................ 13
4.5. net..............................................................................................14
4.6. printer........................................................................................14
4.7. service....................................................................................... 14
4.8. utils........................................................................................... 15
Appendix I. The table of the complete structure of the project.......... 16
1. Introduction
Fig.1 The packages in the project Fig.2 The JNI library files
2.2. scanner
This file contains the main configurations for camera and
barcode scanner.
AmbientLightManager: The class for detecting the
ambient light of the environment for considering
whether the flash LED should be turned on or off.
2.2.1. camera
AutoFocusManager: Create a thread to keep calling the
system function of Camera.autoFocus().
2.2.2. common
BitmapUtils: The utilization for dealing with the Bitmap.
2.2.3. config
The package android.scanner.config is the class to define
the preferences of using the camera.
2.2.4. decode
BitmapDecoder: The class is used for building a bitmap
decoder, and provides a method for getting the decoded
result.
2.2.5. view
ViewfinderResultPointCallback: Override the method of
foundPossibleResultPoint.
2.3. zyapi
CommonApi: The native methods of setting the GPIO
pins and the serial ports are defined in this class.
All the functions achieved in the OnePass app are defined in this
package. The whole package contains nine files to separate it into
different fields. The following subsections introduce each field in
detailed.
4.1. app
ActivityList: Creating an activitylist for managing the
activities in the system. The method of SaveConfig()
and LoadConfig() are used for initializing and changing
the configuration.
4.2. data
AdminItem: The information of the administrator is
defined in this class.
LineItem: Defining the item for line type and line name.
4.2. device
BluetoothReader: This class provides the configuration
and commands for the external Bluetooth fingerprint
reader (HF-7000) when it is connected to the Android
device. If the development is based only on the built-in
modules of the device, there is no need to consider this
class.
4.3. fingermap
This file contains all the activities that achieving the
functions in the app. The interfaces of the App are
configurating to each activity.
AboutActivity: Configurate the interface of showing
the information about the App, which includes the icon,
name and version of the App.
4.4. fpcore
FPMatch: The matching of the fingerprint template is
achieved in this class. The class provides the native
Headquarter: Chongqing Huifan Technology Co., Ltd
Branch: Shenzhen Bio I/E Co., Ltd. Page: 13
www.hfteco.com
4.5. net
HttpConnSoap/ HttpConnSoap2: Both of class are used
for applying the web service in the system.
4.6. printer
PrinterApi: The interface and configuration of the
printer are defined in this class.
4.7. service
ConnectService: Monitoring the USB connection.
4.8. utils
DataUtils: The class provides the interconversions of
different data types, which includes 16-based String
with byte array and 16-based String with String.