Revision Log
Version (Software Ver.-Reference Ver.) | Changelog | Date |
---|---|---|
2.6.1 | Modified: 3.2 Create personnel rule (added two rule methods) Section 6 Serial Ports API Overview Added: 3.4 Fingerprint interface API overview 7.3 RS485 serial port API example 7.4 Fill lamp API example 7.5 Card reader API example 7.6 Fingerprint API development overview 7.7 Proximity sensor (p-sensor) API example | 2019-10-30 |
2.6.2 | Remastered the system architecture in Overview | 2021-06-23 |
Device Software Version Updates/Compatibility Notes
Version 2.6 of this document is released together with device software version 2.6.0.13. This also marks the initial release.
FaceSec Facial Recognition Terminals development platforms are Android-based, and with provided SDKs, third-party developers can easil develop new functionality for these devices. The development platform provides support for a number of features, including facial recognition process flows, personnel management, rule management, identification record management, setting management, etc.
The image below represents the device’s system architecture, on which subsequent platform systems are designed.
Fig 1.1 FaceSec Facial Recognition Terminals Development Platform System Architecture
Development environment and compilation: Use Android Studio (version 3.0 or above recommended). For project compilation: JDK7 or above, Android SDK 24 or above are required.
Before using the SDK, it is necessary to add the SDK and the dependent libraries to the corresponding directories in the development application. Using the following sample code as an illustration, these library files should be imported with the corresponding directories.
Before deploying the SDK, the following libraries should be added to the the application’s dependencies:
Library | Description | Example path |
---|---|---|
app-common.aar | Personnel/rule related interfaces encapsulation and facial capture view component | sdkexample/app/libs |
com.beeboxes.sdk.jar | SDK package | sdkexample/app/ compileonlylibs |
faceviewlibrary.aar | Dependency packages, user-importable | sdkexample/app/libs |
opnext-domain.jar | Entity class definitions, user-importable | sdkexample/app/libs |
support-lib.aar | Device and Cloud Platform exchange interface definitions | sdkexample/app/libs |
the following SDK example, the following classes are usable in third-party development:
Type | Description |
---|---|
MainActivity | Main interface class |
AddPersonActivity | Add Personnel class |
GetPersonActivity | Get/Delete Personnel Class |
TestRuleActivity | Add/Delete Personnel Rule Class |
ODSLActivity | ODSL Setting Class |
These endpoints facilitate CRUD operations on personnel, performing operations on personnel through ID/UUID; Retrieving rules, updating personnel rules; CRUD operation on recognition parameters, etc.
Personnel Management API Table
Common Personnel Management API | |
---|---|
Add Personnel | public static int addPerson(Context context, AppPersonInfo person, String photoPath) |
Update Personnel | public static int updatePerson(Context context, AppPersonInfo person, String photoPath) |
Retrieve Personnel via UUID, with feature | public static AppPersonInfo getPersonByUuid(Context context, String uuid) |
Retrieve Personnel via UUID, without feature data | public static AppPersonInfo getPersonByUuidWithoutFeature(Context context, String uuid) |
Delete personnel via UUID | public static boolean deletePersonByUuid(Context context, String uuid) |
Delete all Personnel | public static boolean deleteAllPerson(Context context) |
Search Personnel via UUID, regex and name | public static List |
Retrieve Personnel list | public static List |
Extract facial features from image | public static ImageExtractResult imageExtract(Context context, String photoPath) |
Authorized Personnel API | |
Add Authorized Personnel | public static int addDoubleCheckPerson(Context context, AppPersonInfo person) |
Update Authorized Personnel | public static int updateDoubleCheckPerson(Context context, AppPersonInfo person) |
Retrieve Authorized Personnel via UUID | public static AppPersonInfo getDoubleCheckPersonByUuid(Context context, String uuid) |
Delete Authorized Personnel via UUID | public static boolean deleteDoubleCheckPersonByUuid(Context context, String uuid) |
Delete all Authorized Personnel | public static boolean deleteAllDoubleCheckPerson(Context context) |
Search Authorized List via ID no. | public static List |
Administrator Management API | |
Add Administrator | public boolean addAdministrator(Administrator administrator) |
Delete Administrator | public boolean deleteAdminByUuid(String uuid) |
Update Administrator | public boolean updateAdmin(Administrator admin) |
Retrieve Administrator via UUID | public Administrator getAdminByUuid(String uuid) |
Retrieve all Administrators | public List |
Retrieve Administrator count | public long getAdminCount() |
Delete all Administrators | public void deleteAllAdmin() |
The main entities covered under personnel management include:
Ordinary personnel
Authorized personnel
Administrators
The following introduces the relevant APIs for the various personnel types.
All interfaces of this module exist as static methods, which can be called directly using the class name. The calling method is: AppPersonManager.xxx (xxx is the specific interface).
The following is a description of the Adding Personnel interface. For the use of other methods, please refer to Adding Personnel and sample code.
Add Personnel
Interface | public static int addPerson(Context context, AppPersonInfo person, String photoPath) |
---|---|
Parameters | Context context: Context AppPersonInfo person: Personnel’s details String photoPath: Personnel image path |
Return Value | Refer to 3.4.1 Error Code Definitions |
Description | To call the Add Personnel interface, you need to first instantiate an AppPersonInfo object, and fill the object with the relevant data (Image, name, ID, personnel rule ID and personnel type are required. Please refer to section 3.2 for Personnel Rules). Define an image retrieval path. Missing photos will result in errors when adding personnel. Note: Personnel without rule assignments will not have access permissions. To avoid creating data discrepancies, if the personnel rules are deleted through the API, the personnel corresponding to the rules will also be deleted. |
Sample code:
x1. private void addPerson() {
2. AppPersonInfo person = new AppPersonInfo();
3. person.setUuid(mEtUuid.getText().toString());
4. person.setName(mEtName.getText().toString());
5. person.setIdCardNumber(mEtId.getText().toString());
6. person.setIcNumber(mEtIc.getText().toString());
7. person.setPersonType(0); //Required. 0 Regular, 1 Guest
8. AppPersonRule rule = (AppPersonRule) mSpRule.getSelectedItem();
9. person.setRuleId(rule.getRuleId());
10. int ret = AppPersonManager.addPerson(this, person, mRawImage);
11. if (ret == AppPersonManager.SUCCESS) {
12. Toast.makeText(this, "Add successed", Toast.LENGTH_LONG).show();
13. } else {
14. Toast.makeText(this, "Add failed", Toast.LENGTH_LONG).show();
15. }
16. }
Update Personnel
Interface | public static int updatePerson(Context context, AppPersonInfo person, String photoPath) |
---|---|
Parameters | Context context:Context AppPersonInfo person: Personnel details String photoPath: Personnel image path |
Return Value | Refer to 3.4.1 Error Code Definitions |
Description | photoPath If blank, the image is considered a replacement and will have its feature values re-extracted. |
Retrieve Personnel with feature
Interface | public static AppPersonInfo getPersonByUuid(Context context, String uuid) |
---|---|
Parameters | Context context: Context String uuid: Personnel no. |
Return Value | Return personnel details with feature values |
Description | The feature value data is 2KB. If you are editing personnel details, you may call this interface. If only used for display, you can call the getPersonByUuidWithoutFeature interface. |
Retrieve Personnel without feature
Interface | public static AppPersonInfo getPersonByUuidWithoutFeature(Context context, String uuid) |
---|---|
Parameters | Context context: Context String uuid: Personnel no. |
Return Value | Return personnel details without feature values |
Description | If a large volume of personnel details needs to be extracted and efficiency is a consideration, this interface can be used. |
Delete Personnel
Interface | public static boolean deletePersonByUuid(Context context, String uuid) |
---|---|
Parameters | Context context: Context String uuid: Personnel no. |
Return Value | Returns deletion result. If true, deletion was executed successfully. If false, deletion failed. |
Description | Delete Personnel via UUID |
Delete All Personnel
Interface | public static boolean deleteAllPerson(Context context) |
---|---|
Parameters | Context context: Context |
Return Value | Returns deletion result of all personnel. If true, deletion was executed successfully. If false, deletion failed. |
Description | Delete all personnel details and images |
Personnel Search Result
Interface | public static List |
---|---|
Parameters | Context context: Context String uuid: Personnel no., required String name: Personnel name, required int offset: Pagination, with each page returning 50 items. Offset starts from 0 and is called cyclically. |
Return Value | Returns a list of personnel information. If it returns null, or Return Valuelist.size == 0, it means that there are no more results. |
Description | Two query methods: UUID, which uses a whole word match, name, which uses a regex search. Using both query methods will produce results with an OR relationship. |
Retrieve Personnel List
Interface | public static List |
---|---|
Parameters | Context context: Context int offset: Pagination, with each page returning 50 items. Offset starts from 0 and is called cyclically. |
Return Value | Returns a list of all personnel information. If it returns null, or Return Valuelist.size == 0, it means that there are no more results. |
Description | Retrieves a list of all Personnel details |
Extract Facial Features from Image
Interface | public static ImageExtractResult imageExtract(Context context, String photoPath) |
---|---|
Parameters | Context context: Context String photoPath: Personnel image path |
Return Value | Includes the extracted features and the final image after extraction |
Description | None |
The authorization personnel management API is similar to the common personnel management interfaces. Refer to the common personnel management API.
The authorized personnel management interface is used during 1:1 comparison. After the comparison is successful, the ID number will need to be rechecked if it has been registered in the device comparison scenario.
Add Authorized Personnel
Interface | public static int addDoubleCheckPerson(Context context, AppPersonInfo person) |
---|---|
Parameters | Context context: Context AppPersonInfo person: Personnel details |
Return Value | Refer to 3.4.1 Error Code Definitions |
Description | None |
Update Authorized Personnel
Interface | public static int updateDoubleCheckPerson(Context context, AppPersonInfo person) |
---|---|
Parameters | Context context: Context AppPersonInfo person: Personnel details |
Return Value | Refer to 3.4.1 Error Code Definitions |
Description | None |
Retrieve Authorized Personnel
Interface | public static AppPersonInfo getDoubleCheckPersonByUuid(Context context, String uuid) |
---|---|
Parameters | Context context: Context String uuid: Personnel no. |
Return Value | Retrieve authorized personnel details |
Description | Retrieve authorized personnel via UUID |
Delete Authorizations
Interface | public static boolean deleteDoubleCheckPersonByUuid(Context context, String uuid) |
---|---|
Parameters | Context context: Context String uuid: Personnel no. |
Return Value | Returns deletion result. If true, deletion was executed successfully. If false, deletion failed. |
Description | Delete authorized personnel via UUID |
Delete All Authorized Personnel
Interface | public static boolean deleteAllDoubleCheckPerson(Context context) |
---|---|
Parameters | Context context: Context |
Return Value | Returns deletion result. If true, deletion was executed successfully. If false, deletion failed. |
Description | None |
Search Authorized Personnel via ID no.
Interface | public static List |
---|---|
Parameters | Context context: Context idCard: ID no. |
Return Value | Return a list of authorized personnel |
Description | If multiple personnel are bound to the same ID, multiple personnel will be returned in the list. Under most scenarios, only one personnel’s detail will be returned. |
When using the administrator management API, the PersonManager object needs to be instantiated first before methods can be called.
The instantiation is as follows:
The initialization of the PersonManager instance object requires the getFaceManager method of FaceRecognizerManager.PERSON_SERVICE as the parameter of FaceRecognizerManager.
The instantiation sample code is as follows, for specific use, please refer to the ExampleApplication class in the sample code:
xxxxxxxxxx
mFaceRecognizerManager = FaceRecognizerManager.getInstance(**this**, mServiceConnectionListener,**null**);
The following is a description of the Adding Administrator interface. For the use of other methods, please refer to Adding Administrator and sample code.
Add Administrator
Interface | public boolean addAdministrator(Administrator administrator) |
---|---|
Parameters | administrator: Administrator details |
Return Value | True signifies successful addition, false signifies addition failed. |
Description | To call this interface, you need to instantiate an Administrator object. |
The sample code is as follows, mPersonService being an instance of PersonManager:
xxxxxxxxxx
1. mAdmin = **new** Administrator();
2. mAdmin.setUuid(UUIDGenerator.getUUID());
3. mAdmin.setLightFeature(mLightFeature);
4. mAdmin.setName(mEtName.getText().toString());
5. mAdmin.setVerifyType(0);
6. String encrypt = MD5Utils.encrypt(mEtPassword.getText().toString());
7. mAdmin.setPassword(encrypt);
8. Boolean isSuccess =mPersonService.addAdministrator(mAdmin);
Delete Administrator
Interface | public boolean deleteAdminByUuid(String uuid) |
---|---|
Parameters | uuid: Personnel ID |
Return Value | True signifies successful deletion. False signifies deletion failed. |
Description | Delete the administrator via UUID |
Edit Administrator
Interface | public boolean updateAdmin(Administrator admin) |
---|---|
Parameters | admin: Administrator details |
Return Value | True signifies successful edit. False signifies editing failed. |
Description | Update administrator details via UUID |
Retrieve Administrator
Interface | public Administrator getAdminByUuid(String uuid) |
---|---|
Parameters | uuid: Personnel ID |
Return Value | Returns administrator details |
Description | Retrieves administrator details via UUID |
Retrieve All Administrators
Interface | public List |
---|---|
Parameters | None |
Return Value | Returns a list of all administrators |
Description | None |
Get Administrator Count
Interface | public long getAdminCount() |
---|---|
Parameters | None |
Return Value | Returns the number of administrators |
Description | None |
Delete All Administrators
Interface | public void deleteAllAdmin() |
---|---|
Parameters | None |
Return Value | None |
Description | None |
All interfaces of this module exist as static methods, which can be called directly by the class name. The calling method is: AppPersonRuleManager.xxx (xxx is the specific interface).
Personnel Rule Management API Overview
Personnel Rule Management API | |
---|---|
Retrieve all Personnel Rules | public static List |
Retrieve Personnel Rules Matching Search Criteria | public static List |
Check if Personnel Rule Exists | public static boolean isRuleExists(Context context, String ruleId) |
Edit Personnel Rule | public static void updateRule(Context context, AppPersonRule appPersonRule) |
Create Personnel Rule Time Period | public static TimeRule buildTimeRule(String title, TimeRule.Type dayType, Range<Range.Day> dayRange,TimeRule.DayType weeKType, Set |
Create Personnel Rule | public static boolean addRule(Context context , String name, String description, String prompt,List<Rule.AccessType> typeList, List |
Create or Edit Personnel Rule | public static AppPersonRule addOrUpdate (Context context, final AppPersonRule rule) |
The following only gives sample codes for the interface of creating personnel rules. For the use of other interfaces, please refer to Creating Personnel Rules interface and sample code.
Retrieve all Personnel Rules
Interface | public static List |
---|---|
Parameters | Context context: Context |
Return Value | Returns List |
Description | None |
Retrieve Personnel Rules Matching Search Criteria
Interface | public static List |
---|---|
Parameters | Context context: Context String selection: ContentProvider selection parameter String[] selectionArgs: ContentProvider selectionArgs parameter int pageSize: Pagination parameters, with the number displayed on each page. 0 signifies no pagination. int offset: Offset parameter, indicating which page |
Return Value | Returns a List |
Description | The selection and selectionArgs (same as ContentProvider parameters) in the parameters are the search conditions. The user can construct the search query according to the database field matching rules. The following is the database field description: RULE_ID: String type, the personnel rule ID is stored in AppPersonRule.ruleId. VALID_TILL: Long type, signifying rule validity period. If the value is null, it means that the rule has no expiry date. If the rule is designated as periodic (such as weekly repetition), the time stamp will be calculated according to the specific rule time period. Stored in AppPersonRule.validTill. OBJ: Rule details, stored in AppPersonRule.obj. |
Check if Personnel Rule Exists
Interface | public static boolean isRuleExists(Context context, String ruleId) |
---|---|
Parameters | Context contex: Context String ruleId: Rule ID |
Return Value | True signifies the rule exists, false indicates rule is not found. |
Description | None |
Update Personnel Rule
Interface | public static void updateRule(Context context, AppPersonRule appPersonRule) |
---|---|
Parameters | Context contex: Context AppPersonRule appPersonRule: Personnel rule details to be updated |
Return Value | None |
Description | None |
Create Personnel Rule Time Period
Interface | public static TimeRule buildTimeRule(String title, TimeRule.Type dayType, Range<Range.Day> dayRange,TimeRule.DayType weeKType, Set |
---|---|
Parameters | String title: Rule name TimeRule.Type dayType: Validity date type CYCLE Permanent TIMING Periodic If this parameter is set as TIMING, setting of the Range<Range.Day> dayRange parameter indicates the validity date range Range<Range.Day> dayRange: When the type is TIMING, this parameter is used to indicate the date range of the validity period TimeRule.DayType weeKType: Signifies the validity days EVERYDAY Full week WEEKDAY Monday to Friday CUSTOM User-defined validity period. The Set Set Sunday 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday 6 Saturday 7 Range<Range.Time> timeRange: Validity Period Action action: Rule action ALLOW Allow access DENY Deny access Note: For time rules, users need to ensure that they are valid. For example, the end time of a periodic rule needs to be later than the start time. If a rule is invalid, the rule will never take effect. Users need to manually handle any invalid time rules. |
Return Value | Time rule object |
Description | The personnel rule time rule consists of the following elements: Rule name Rule validity date: It can be permanent or a user-defined date range Rule effective week: Indicates within the validity date range, which day of the week will the rule take effect Rule effective time: Indicates the time period of the day, within the effective week of the rule, will the rule take effect Way of Access: Indicates whether the rule allows or prohibits access within the effective time range |
Create Personnel Rule
Interface | public static boolean addRule(Context context , String name, String description, String prompt,List<Rule.AccessType> typeList, List |
---|---|
Parameters | String name: Rule name String description: Rule description String prompt: Prompt details (currently not in use) List<Rule.AccessType> typeList: Access method. Can be selected individually, or FACE can be combined with other options. FACE Face FACE_AND_ID Face + ID FACE_AND_PASSPORT Face + Password FACE_AND_GUARD Face + Door Card FACE_AND_IC Face + IC Card FACE_AND_PASSWORD Face + Password IC IC Card FINGERPRINT Fingerprint List Users will need to ensure that the incoming timeRuleList is valid, otherwise anomalies may occur during rule assessment and cause erroneous results in allowing/denying personnel access boolean isShowed: Whether to display in the list of personnel rules in Settings |
Return Value | True signifies personnel rule update succeeded. Failed signifies update failed. |
Description | For expired personnel rules, devices in cloud service mode will automatically clean up the rules and personnel corresponding to the rules. Single-host mode does not support automatic cleanup, and users will need to clear expired rules and personnel associations manually. |
Sample code:
xxxxxxxxxx
1. **private** **void** addRule() {
2. Set<Integer> weekDays = **new** ArraySet<>();
3. weekDays.add(1);
4. weekDays.add(2);
5. weekDays.add(3);
6. Range<Range.Time> timeRange = **new** Range<Range.Time>();
7. Range.Time start = timeRange.**new** Time();
8. start.setHour(0);
9. start.setMinute(0);
10. start.setSecond(0);
11. Range.Time end = timeRange.**new** Time();
12. end.setHour(23);
13. end.setMinute(59);
14. end.setSecond(59);
15. timeRange.setStart(start);
16. timeRange.setEnd(end);
17. TimeRule timeRule = AppPersonRuleManager.buildTimeRule("TestRuleTitle", TimeRule.Type.CYCLE, **null**, TimeRule.DayType.CUSTOM, weekDays, timeRange, Action.ALLOW);
18. List<TimeRule> timeRuleList = **new** ArrayList<>();
19. timeRuleList.add(timeRule);
20. List< Rule.AccessType > typeList = **new** ArrayList<>();
21. typeList.add(Rule.AccessType.FACE);
22. AppPersonRuleManager.addRule(**this**, "RuleName", "RuleNameDescription", "prompt", typeList, timeRuleList, **true**);
23. }
Create or Edit Personnel Rule
Interface | public static AppPersonRule addOrUpdate (Context context, final AppPersonRule rule) |
---|---|
Parameters | Context contex: Context final AppPersonRule rule:Create or edit personnel rule entity |
Return Value | AppPersonRule If saving fails, the return value is null. If the save succeeds, the successfully saved AppPersonRule is returned. The returned AppPersonRule may differ from the provided parameter AppPersonRule. For example, AppPersonRule. validTill may be recalculated. |
Description | Similar to the use of updateRule, the return value AppPersonRule is added to be used in certain specific usage scenarios to get the rule ID immediately after inserting the personnel rule to facilitate subsequent operations. Note: If AppPersonRule.ruleId is empty, it will signify the creation of a new personnel rule. If it is not empty, it signifies an existing rule being updated. |
All interfaces of this module exist as static methods, which can be called directly using the class name. The calling method is: AppGroupManager.xxx (xxx is the specific interface).
Recognition Parameters API Overview
Recognition Parameters API | |
---|---|
Add Recognition Parameter Library via Name | public static int addGroup(String name) |
Delete Recognition Parameter Library via Name | public static void delGroup(String name) |
Retrieve Recognition Parameter Library ID by Name | public static String getGroupIdByName(String name) |
Check if Recognition Parameter Library Exists by ID | public static boolean isGroupExistsById(String groupId) |
Check if Recognition Parameter Library Exists by Name | public static boolean isGroupExistsByName(String groupName) |
Get Recognition Parameter Library Count | public static int getGroupCount() |
Add Recognition Parameter Library via Name
Interface | public static int addGroup(String name) |
---|---|
Parameters | String name: New parameter library name |
Return Value | Refer to 3.4.2 Error Code Definitions. |
Description | Create a recognition threshold library by name. Other recognition parameters are the same as the default recognition parameter library. |
Delete Recognition Parameter Library via Name
Interface | public static void delGroup(String name) |
---|---|
Parameters | String name: Parameter library name |
Return Value | None |
Description | None |
Retrieve Recognition Parameter Library ID by Name
Interface | public static String getGroupIdByName(String name) |
---|---|
Parameters | String name: Parameter library name |
Return Value | Recognition parameter library ID |
Description | None |
Check if Recognition Parameter Library Exists by ID
Interface | public static boolean isGroupExistsById(String groupId) |
---|---|
Parameters | String groupId: Recognition parameter library ID |
Return Value | true: The library exists. false: The library was not found |
Description | None |
Check if Recognition Parameter Library Exists by Name
Interface | public static boolean isGroupExistsByName(String groupName) |
---|---|
Parameters | String groupName: Recognition parameter library name |
Return Value | true: The library exists. false: The library was not found |
Description | None |
Get Recognition Parameter Library Count
Interface | public static int getGroupCount() |
---|---|
Parameters | None |
Return Value | Return recognition parameter library count |
Description | None |
SDK version 2.6 supports 1:N fingerprints comparison. Currently, fingerprint information for a maximum of 5000 people can be stored, with a maximum of 2 fingerprints per person.
When calling the fingerprint interface, users should also call the personnel management interface. When adding personnel, the fingerprint adding interface should be called at the same time. When deleting personnel information, the fingerprint delete interface should be called at the same time to ensure the synchronization of personnel and fingerprint information.
The newly-added SDK fingerprint-related interfaces are encapsulated in com.beeboxes.device.DeviceManager. Users can obtain DeviceManager instances through DeviceManager.getInstance(), and then call the fingerprint-related interfaces.
Fingerprint Interface API Overview
Fingerprint Interface API | |
---|---|
Add Fingerprint | public void addFinger(Finger finger) |
Update Fingerprint | public void updateFinger(Finger finger) |
Delete Fingerprint | public void deleteFingerByUuid(String uuid) |
Delete All Fingerprints | public void deleteAllFinger() |
Retrieve Fingerprint | public Finger getFingerByUuid(String uuid) |
Get Fingerprint Count | public int getFingerCount() |
Register Data Listener | public void registerDataAvailableListener(Input type, IDataAvailableListener listener); |
Unregister Data Listener | public void DeviceManager.unregisterDataAvailableListener( IDataAvailableListener listener); |
Add Fingerprint
Interface | public void addFinger(Finger finger) |
---|---|
Parameters | Finger finger: Fingerprint details, including personnel number, and up to five fingerprint details. However, only up to two fingerprints are currently supported. |
Return Value | None |
Description | None |
Update Fingerprint
Interface | public void updateFinger(Finger finger) |
---|---|
Parameters | Finger finger: Fingerprint details, including personnel number, and up to five fingerprint details. However, only up to two fingerprints are currently supported. |
Return Value | None |
Description | None |
Delete Fingerprint
Interface | public void deleteFingerByUuid(String uuid) |
---|---|
Parameters | String uuid: Personnel no. to delete the fingerprints from |
Return Value | None |
Description | None |
Delete All Fingerprints
Interface | public void deleteAllFinger() |
---|---|
Parameters | None |
Return Value | None |
Description | None |
Retrieve Fingerprint
Interface | public Finger getFingerByUuid(String uuid) |
---|---|
Parameters | String uuid:The Personnel ID to retrieve fingerprints from. |
Return Value | Returns the fingerprint details, including personnel number, and up to five fingerprint details. However, only up to two fingerprints are currently supported. |
Description | None |
Get Fingerprint Count
Interface | public int getFingerCount() |
---|---|
Parameters | None |
Return Value | Returns count of currently stored fingerprints |
Description | None |
Register Data Listener
Interface | public void registerDataAvailableListener(Input type, IDataAvailableListener listener); |
---|---|
Parameters | Input type: The monitoring device type, if it is fingerprint monitoring, the type should be Device.Input.FINGERPRINT IDataAvailableListener listener: monitor listener instance, when fingerprint information is reported, call the callback function in IDataAvailableListener |
Return Value | None |
Description | Users can use the data monitoring interface to enter fingerprints information and synchronize it with the fingerprint add/update interface, to implement a full fingerprint registration function. |
Unregister Data Listener
Interface | public void DeviceManager.unregisterDataAvailableListener( IDataAvailableListener listener); |
---|---|
Parameters | IDataAvailableListener listener:Existing listener object |
Return Value | None |
Description | None |
Add fingerprint sample code: Users can use the data monitoring interface to enter fingerprints information and synchronize it with the fingerprint add/update interface, to implement a full fingerprint registration function.
xxxxxxxxxx
1. IDataAvailableListener mListener = new IDataAvailableListener() {
2.
3.
4. public void onDataAvailable(Device.Input input, Object o) {
5. if (input == Device.Input.FINGERPRINT) {
6. FingerPrint fp = (FingerPrint) o;
7. byte[] fingerFeature = fp.getFeatures();
8. Finger finger = new Finger(uuid, fingerFeature, null, null, null, null);
9. DeviceManager.getInstance().addFinger(finger);
10. }
11. }
12. }
xxxxxxxxxx
1. public static final int SUCCESS = 0x1; // Success
2. public static final int UUID_NULL_ERROR = 0x2; // Personnel ID is blank
3. public static final int UUID_REPEAT = 0x4; // Non-unique personnel ID
4. public static final int UUID_UNDEFINE = 0x8; // Personnel ID not found
5. public static final int UUID_FORMAT_ERROR = 0x10; // Invalid personnel ID format
6. public static final int NAME_NUll_ERROR = 0x20; // Name is blank
7. public static final int NAME_FORMAT_ERROR = 0x40; // Invalid name format
8. public static final int SERVICE_INSERT_ERROR = 0x80; // Service error
9. public static final int FEATURE_ERROR = 0x100; //Personnel feature retrieval failed
10. public static final int PARAM_ERROR = 0x200; // Parameter error
11. public static final int IC_FORMAT_ERROR = 0x400; // Invalid IC card format
12. public static final int WG_FORMAT_ERROR = 0x800; // Invalid Wiegand format
13. public static final int GROUP_ID_INEXISTENT = 0x1000; // Recognition parameter library not found
14. public static final int EXTERN_FORMAT_ERROR = 0x2000; //Personnel details extension format error
15. public static final int FR_SERVICE_DISCONNECTED = 0x4000; // FR SERVICE disconnected
16. public static final int PERSON_OVER_RANGE_ERROR = 0x8000; //Exceeded personnel storage capacity
17. public static final int SEX_FORMAT_ERROR = 0x10000; // Invalid personnel gender format
18. public static final int IDCARD_FORMAT_ERROR = 0x20000; // ID card format error
19. public static final int RULE_ID_ERROR = 0x40000; // Personnel Rule ID not found
20. public static final int UNKNOW = 0x80000;
xxxxxxxxxx
1. public static final int SUCCESS = 0x1; // Success
2. public static final int FAILED = 0x2; // Failed
3. public static final int GROUP_FORMAT_ERROR = 0x4; // Recognition parameter library format error
4. public static final int GROUP_OUT_OF_RANGE = 0x8; // Recognition parameter library capacity exceeded
5. public static final int GROUP_EXISTS = 0x10; // Recognition parameter library already exists
6. public static final int PARAM_ERROR = 0x20; // Parameter error
Settings management is about providing unified configuration information reading and configuration for the entire platform. Supports the import and export of setting management files in single-host mode, and the platform to send down and upload configuration information.
Settings Management API is pictured below:
Figure 3.1 Settings Management API
Settings Management API Overview
Settings Management API | |
---|---|
Set Attribute | public void set(String key, String value) |
Get Attribute | public String get(String key) public String getString(String key, String def) public boolean getBoolean(String key, boolean def) public int getInt(String key, int def) public long getLong(String key, long def) |
Remove Attribute | public void remove(String key) |
Register Callback Endpoint | public void registerCallback(Callback callback) |
The operations for attribute configuration is as follows.
Interface | public void set(String key, String value) |
---|---|
Parameters | String key: Keyword to set the corresponding attribute. String value: The value to set the attribute as. |
Return Value | None |
Description | If the attribute type is defined as Boolean, the value should be set to ‘true’ or ‘false’. Avoid using ‘1’ or ‘0’, Sample call: SettingsManager.getInstance().set(“testkey”, “value”); |
Interface | public String get(String key) |
---|---|
Parameters | String key: Keyword to get the corresponding attribute |
Return Value | Returns a variable of type String |
Description | Get the attribute value in type String. When the return value cannot be parsed, or an error occurs, it returns null. |
Sample call | String test = SettingsManager.getInstance().get(“testkey”); |
Interface | public String getString(String key, String def) |
---|---|
Parameters | String key: Keyword to get the corresponding attribute long def: Default value |
Return Value | Get the attribute value in type String. When the return value cannot be parsed, or an error occurs, it returns null. |
Description | Get the attribute value in type String. |
Sample call | String test = SettingsManager.getInstance().getString(“testkey”, “defaultValue”); |
Interface | public boolean getBoolean(String key, boolean def) |
---|---|
Parameters | String key: Keyword to get the corresponding attribute long def: Default value |
Return Value | Get the attribute value in type Boolean. When the return value cannot be parsed, or an error occurs, it returns null. |
Description | Get the attribute value in type Boolean. |
Interface | public int getInt(String key, int def) |
---|---|
Parameters | String key: Keyword to get the corresponding attribute long def: Default value |
Return Value | Get the attribute value in type int. When the return value cannot be parsed, or an error occurs, it returns null. |
Description | Get the attribute value in type int. |
Interface | public long getLong(String key, long def) |
---|---|
Parameters | String key: Keyword to get the corresponding attribute long def: Default value |
Return Value | Get the attribute value in type long. When the return value cannot be parsed, or an error occurs, it returns null. |
Description | Get the attribute value in type Long. |
Interface | public void remove(String key) |
---|---|
Parameters | String key : Keyword to remove the corresponding attribute |
Return Value | None |
Description | Delete the value with attribute with the corresponding key. |
Interface | public void registerCallback(Callback callback) |
---|---|
Parameters | Callback callback: Callback entity |
Return Value | None |
Description | The device needs to implement the Callback interface class and pass it to the SDK class through registerCallback to track attribute changes. |
The access records fields are as below:
xxxxxxxxxx
1. CREATE TABLE IF NOT EXISTS record
2. (
3. Id INTEGER PRIMARY KEY AUTOINCREMENT,
4. recorduploadflag INTEGER,
5. obj TEXT
6. );
Among them, Id is a self-incrementing database field, which can be sorted to get the latest identification record, recorduploadflag is the cloud service mode upload flag bit, the obj field is the JSON data that stores the identification record, and the corresponding entity class is located in the opnext-domain of FaceSec AccessRecord class in the package. You can use fastJson or Gson parsing methods to obtain identification record information. The recorded information includes information such as the person's name, gender, and comparison photos.
An interface is provided for the querying and deletion of FaceSec’s access records through ContentProvider.
The authority and Uri required for obtaining are defined as follows:
xxxxxxxxxx
1. public static final String AUTHORITY = "com.beeboxes.face.record.provider";
2. public static final Uri RECORD_CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/record");
Interface | Cursor cursor = getContentResolver().query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder); |
---|---|
Parameters | uri: The query identification record uri must be the predefined RECORD_CONTENT_URI |
Return Value | cursor type |
Description | A standard content provider query interface is implemented for access records. uri must be a predefined RECORD_CONTENT_URI, and the remaining four parmeters must be the same as the standard Android content provider quert interface. |
The third-party developers can use the serial ports to connect their own peripherals, and call the serial API interface to implement the serial port applications.
Android devices will need to import the SDK package (com.beeboxes.sdk.jar) to the compileonlylibs directory.
The serial port class is initialized as follows:
xxxxxxxxxx
1. BBoxSerial serial = (BBoxSerial);
2. DeviceManager.getInstance().getOutputDevice(Device.Output.SERIAL);
3. BBoxSerial.SerialPort sp = serial.createSerialPort(path, 115200);
The serial port interface is as follows:
xxxxxxxxxx
1. void open() throws IOException;
2. int read (byte[] buffer, int length) throws IOException;
3. int write (byte[] buffer, int length) throws IOException;
4. void close() throws IOException;
The third-party developers can transmit user data to PC via serial API, such as Access Record, Log, etc. In order to make development on Android and PC compatible, the Demo of PC is applied the same API design as that on Android.
Write permissions to external media storage are required:
xxxxxxxxxx
android.permission.WRITE_EXTERNAL_STORAGE
Serial Port
xxxxxxxxxx
1. public interface ITansport {
2. void open() throws IOException;
3. int read(byte[] var1, int var2) throws IOException;
4. int write(byte[] var1, int var2) throws IOException;
5. void close() throws IOException;
6. }
System Log
xxxxxxxxxx
1. public interface ILog {
2. void log(String var1);
3. }
Enable system logging
xxxxxxxxxx
1. SerialManager.installLogger(mLoger);
2. SerialManager.setDebugable(true);
Two data transmission interfaces are provided
Synchronous transmission:
xxxxxxxxxx
mSerialManager.send(byte[] buffer, int offset, int len);
Asynchronous transmission:
xxxxxxxxxx
mSerialManager.sendAsync(**byte**[] buffer, **int** offset, **int** len, IDataTransCallback callback);
File transfer interface
xxxxxxxxxx
mSerialManager.sendFile(String path, IFileTransCallback callback);
Note: This interface only provides asynchronous transmission interface
Register data listener
xxxxxxxxxx
mSerialManager.registerDataListener(IDataListener listener);
Register file receiver listener
xxxxxxxxxx
mSerialManager.registerFileReceiveListener(IFileReceiveListener listener);
Create serial port class
xxxxxxxxxx
1. BBoxSerial = (BBoxSerial)
2. DeviceManager.getInstance().getOutputDevice(Device.Output.SERIAL);
3. mSerialManager = new SerialManager(serial.createSerialPort(path, baud));
Register data listener. When a client sends data, it will call back to the user through this interface
xxxxxxxxxx
SerialManager.registerDataListener(mDataListener);
Register file receiver listener. When a file is received,the user will be notified of its progress and completion through this interface
xxxxxxxxxx
mSerialManager.registerFileReceiveListener(mFileReceiveListener);
Enable transfer mode. This command must be executed before a data transfer can be executed
xxxxxxxxxx
mSerialManager.startTransfer();
Stop transfer, when the port is no longer in use
xxxxxxxxxx
mSerialManager.stopTransfer();
Import the serial SDK library SerialTransport.jar on the PC to the libs directory
xxxxxxxxxx
1. import com.beeboxes.device.serial.transport.ITansport;
2. import com.beeboxes.device.serial.transport.SerialManager;
Create a serial port management class: SerialManager is used to manage the serial port
xxxxxxxxxx
1. SerialPort serial = new SerialPort(path, baud);
2. mSerialManager = new SerialManager(serial);
Register data listener. When a client sends data, it will call back to the user through this interface
xxxxxxxxxx
1. mSerialManager.registerDataListener(mDataListener);
Register file receiver listener. When a file is received,the user will be notified of its progress and completion through this interface
xxxxxxxxxx
mSerialManager.registerFileReceiveListener(mFileReceiveListener);
Enable transfer mode. This command must be executed before a data transfer can be executed
xxxxxxxxxx
mSerialManager.startTransfer();
Stop transfer, when the port is no longer in use
xxxxxxxxxx
mSerialManager.stopTransfer();
Control a door through dry contact by setting the DoorCmdInfo class and setting the door parameter DoorCmd.
xxxxxxxxxx
1. public class DoorCmdInfo {
2. private DoorCmd mCmd = INVALID;
3.
4. public enum DoorCmd {
5. INVALID,
6. OPEN,
7. CLOSE,
8. ALWAYS_OPEN,
9. }
10.
11. public int setCmd(DoorCmd cmd) {
12. mCmd = cmd;
13. return 0;
14. }
15. }
Functions | |
---|---|
public int setCmd (DoorCmd cmd) | DoorCmdInfo class member functions |
cmd | DoorCmd value OPEN- Open door. After the specified interval in SignalTime, the door will be closed automatically. CLOSE- Close door. ALWAYS_OPEN- Unlock door and deactivate auto-lock. A CLOSE command must be issued to lock the door. |
Functions | |
---|---|
public int setSignalTime(int time) | Wiegand class member functions |
time | OPEN- Door opening interval, units in us. |
Functions | |
---|---|
public int sendCmd(Device.Output type, Object obj) | DeviceManager class member functions |
type | Device.Output defined device type |
obj | Object command to send |
Interface call sample:
xxxxxxxxxx
1. DoorCmdInfo doorCmdInfo = **new** DoorCmdInfo();
2. doorCmdInfo.setCmd(DoorCmdInfo.DoorCmd.OPEN);
3. mDeviceManager.sendCmd(doorCmdInfo.getDeviceType(), doorCmdInfo);
Description:setCmd can also call the door unlock command DoorCmdInfo.DoorCmd.ALWAYS_OPEN。
There are a number of Wiegand protocols, which need to be updated for deployment. Set the parameters of the corresponding protocol, corresponding to the WgConfig class. For specific parameters, please refer to the following class description.
xxxxxxxxxx
1. public class WgConfig implements Parcelable {
2. private Type mType = Type.WG_none;
3.
4. private int mAllBits;
5. private int mDataBits;
6. private boolean bCheck = false;
7. private int mOCheckBits;
8. private int mECheckBits;
9. private int mPulseWidth;
10. private int mPulseInterval;
11.
12. public static enum Type {
13. WG_none,
14. WG_26,
15. WG_34,
16. WG_36,
17. WG_64,
18. WG_Custom,
19. WG_Max
20. }
21. }
The Type value is the different protocol types of Wiegand. For different type values, you need to set the corresponding mAllBits, mDataBits and other parameters.
Functions | |
---|---|
public void setType(Type type) | Set Wiegand protocol type |
public void setAllBits(int allBits) | Set the total number of data bits |
public void setDataBits(int dataBits) | Set the number of valid data bits |
public void setOCheckBits(int OCheckBits) | Set odd parity digits |
public void setECheckBits(int ECheckBits) | Set even parity digits |
public void setPulseWidth(int pulseWidth) | Set pulse width |
public void setPulseInterval(int pulseInterval) | Set pulse interval |
Functions | |
---|---|
public int sendCardId(WgConfig.Type type, String cardId) | Wiegand class member functions |
type | WgConfig.Type Defined Wiegand type |
cardId | cardId Data to be sent |
Interface call example:
xxxxxxxxxx
1. DeviceManager outDevManager = DeviceManager.getInstance();
2. Wiegand wiegand = (Wiegand) outDevManager.getOutputDevice(Device.Output.WIEGAND);
3. wiegand.sendCardId(WgConfig.Type.WG_26, wgNumber);
Parameters: Wiegand wgNumber, user data, defined by the user.
Description:Wiegand parameter configuration can be set through the system configuration menu.
Only access control devices have Wiegand related configuration, and the Wiegand parameter configuration can be opened in the menu Basic -> Advanced -> Access Control Signal. Wiegand parameters can be configured with general Wiegand types, or custom types, defining pulse interval width, total number of bits, number of data bits, and parity.
Interface call example:
xxxxxxxxxx
DeviceManager outDevManager = DeviceManager.getInstance();
Wiegand wiegand= (Wiegand) outDevManager.getOutputDevice(Device.Output. WIEGAND);
Wiegand.setConfig(WgConfig wgConfig)
Parameter: wgConfig, the parameter definition of Wiegand output, see the table below.
WgConfig | Wiegand class |
---|---|
mType | Wiegand type,WG_none,WG_26,WG_34,WG_36,WG_64,WG_Custom |
mAllBits | All data bit length |
mDataBits | Valid bits |
bCheck | Is parity checks required |
mOCheckBits | Odd parity digit |
mECheckBits | Even parity digit |
mPulseWidth | Pulse width |
mPulseInterval | Pulse interval |
RS485 serial port API is an ordinary serial port that is automatically converted by hardware, and the software interfaces are consistent, so software development can use [6.1 Serial API Basic Interface].
Visible light has three colors: red, green, and white. Among them, only white can be adjusted for brightness, red and green are not adjustable and can only be turned on and off.
Functions | SupplementLight class |
---|---|
public int setBrightness(int brightness) | Set the brightness of the white light. Only effective for white. |
public int setLightColor(int color) | Turn on the color light, the white light turns on the brightness set last time, and the other red and green lights are turned on according to the default brightness. Color can take the enum value of LightColor. |
Interface call example:
xxxxxxxxxx
DeviceManager outDevManager = DeviceManager.getInstance();
SupplementLight light = (SupplementLight) outDevManager.getOutputDevice(Device.Output.SUPPLEMENT_LIGHT);
light.setBrightness(brightness);
Parameters: brightness, the brightness value is defined by the user, the range is 0-255.
Infrared lamp. Brightness is adjustable.
Functions | SupplementLight class |
---|---|
public int setNirLight(int brightness) | Set the brightness of the infrared light. Only effective for the infrared light. |
Interface call example:
xxxxxxxxxx
DeviceManager outDevManager = DeviceManager.getInstance();
SupplementLight light = (SupplementLight) outDevManager.getOutputDevice(Device.Output.SUPPLEMENT_LIGHT);
light.setNirLight(brightness);
Parameters: brightness - the brightness value is defined by the user, the range is 0-255.
Calling the card reading interface. IDCARD provided as an example:
xxxxxxxxxx
DeviceManager mDeviceManager = DeviceManager.getInstance();
mDeviceManager.registerDataAvailableListener(Device.Input.IDCARD, this);
public void onDataAvailable(final Device.Input type, final Object device) {
if(type == IDCARD) {
final BBoxIDCard idcard = (BBoxIDCard) device;
}
}
Parameter: The IDCARD class data returned by the device can be converted into the BBoxIDCard class to obtain various information of the ID card. The class information is shown in the table below.
Description: The card reader module mainly uses the registered listener, and the App only needs to process the required data in the callback. This scheme is common to other Input and Output devices.
The following are some class descriptions of card readers.
BBoxIDCard | ID Card class |
---|---|
mName | Name |
mSex | Gender |
mNation | Nationality |
mBirthday | Birthdate |
mAddress | Address |
mCardNo | Card no. |
mDepartment | Issuing agency |
mValidDateStart | Validity period start date |
mValidDateEnd | Expiry date |
mIssueTimes | Data read timestamp |
mFP | Fingerprint data |
photo | Image |
M1Card | IC card/M1 card class |
---|---|
mUid | Card no. |
mAtqa | ATQA code |
mSak | SAK code |
An example of calling the interface of the fingerprint module. The DeviceManager instance must be retrieved first, and then call the relevant interface:
xxxxxxxxxx
DeviceManager mDeviceManager = DeviceManager.getInstance();
mDeviceManager.registerDataAvailableListener(Device.Input.FINGERPRINT, this);
public void onDataAvailable(final Device.Input type, final Object device) {
if(type == FINGERPRINT) {
final FingerPrint fp = (FingerPrint) device;
byte[] features = fp.getFeatures(); //Retrieve fingerprint feature
Photo photo = fp.getPhoto(); //Retrieve fingerprint image
}
}
Parameters: The fingerprint FingerPrint data returned by the device can be converted to the FingerPrint class to obtain the characteristic value data of the fingerprint. The class is shown in the table below.
Description: The fingerprint module is mainly called through the register listener; the App only needs to process the required fingerprint data in the callback.
FingerPrint | Fingerprint class |
---|---|
mFeatures | Fingerprint feature |
mPhoto | Fingerprint image |
1: 1 fingerprint comparison is generally used for the one-to-one comparison of ID cards. It needs to be used in conjunction with 3.5 IDCard. When ID card information is read and the ID card information contains fingerprint information, the Fingerprint comparison interface can be called.
Interface call example:
xxxxxxxxxx
DeviceManager mDeviceManager = DeviceManager.getInstance();
mDeviceManager.registerDataAvailableListener(Device.Input.IDCARD, this);
public void onDataAvailable(final Device.Input type, final Object device) {
if(type == IDCARD) {
final BBoxIDCard idcard = (BBoxIDCard) device;
byte[] fp = idcard.getFP(); //Fingerprint data retrieved from the card
if (fp != null) {
MatchResult result = mDeviceManager. matchFingerPrint(); //1:1 fingerprint comparison
}
}
}
Parameter: MatchResult is the result of fingerprint comparison, detailed information is shown in the table below.
MatchResult | Fingerprint comparison class |
---|---|
mScore | Maximum similarity value of fingerprint comparison feature value (0-1000) |
mIndex | The index of the fingerprint with the largest similarity value, used for 1:N. |
mUuid | The owner of the fingerprint with the highest similarity value, used for 1:N. |
mResultCode | Comparison result. 0 is correct, non-zero is incorrect |
mErrorCode | Error code. 0 is a valid result. Error codes are described: IDCARD_NO_DEV = -1 FINGERPRINT_NO_DEV = -2 IDCARD_NOT_DETECTED = -3 FINGERPRINT_NOT_DETECTED = -4 |
mPhoto | Fingerprint image |
1:N fingerprint comparison is generally used for most comparison scenarios. The fingerprint data of N needs to be stored in advance, then a fingerprint is read and compared against it. Because the fingerprint information is embedded in the personnel information, refer to section 3.4 "Fingerprint Interface API" for the specific fingerprint-related addition, deletion, and modification API can.
Interface call example:
xxxxxxxxxx
String uidName = "zhangsan"; //UID represents a personnel’s details
byte[] finger0 = new byte[512];
byte[] finger1 = new byte[512];
byte[] finger2 = new byte[512];
byte[] finger3 = new byte[512];
byte[] finger4 = new byte[512];
// The above 5 fingerXs should be filled with the characteristic value of the actual fingerprint.
Finger finger = new Finger(uidName, finger0, finger1, finger2, finger3, finger4);
addFinger(finger); //Add fingerprint data
updateFinger(finger); //Or update an existing fingerprint object
DeviceManager mDeviceManager = DeviceManager.getInstance();
mDeviceManager.registerDataAvailableListener(Device.Input.FINGERPRINT, this);
public void onDataAvailable(final Device.Input type, final Object device) {
if(type == FINGERPRINT) {
final FingerPrint fp = (FingerPrint) device;
byte[] features = fp.getFeatures(); // Get the current fingerprint feature value
MatchResult result = mDeviceManager. matchFingerPrintsN(features); //1:N Fingerprint comparison
}
}
Parameter: MatchResult is the result of fingerprint comparison, see the class description for details.
Finger | Fingerprint class |
---|---|
uuid | User ID information of this fingerprint |
finger0 | Fingerprint feature value sequence 0 |
finger1 | Fingerprint feature value sequence 1 |
finger2 | Fingerprint feature value sequence 2 |
finger3 | Fingerprint feature value sequence 3 |
finger4 | Fingerprint feature value sequence 4 |
Proximity sensor p-sensor interface call example:
xxxxxxxxxx
DeviceManager mDeviceManager = DeviceManager.getInstance();
Proximity mProximity = mDeviceManager.getOutputDevice(Device.Output.PROXIMITY);
mProximity.registerDistanceListener(mIDistanceListener);
mIDistanceListener = new IDistanceListener() {
public void onDistance(int distance) {
}
};
Parameters: distance returned by the current measured distance, in millimeters. The normal test range is 0-800mm, and the error range is plus/minus 5mm, limited to indoor environments.
Description: The short-range P-Sensor module mainly uses the register listener method, and the App only needs to process the required data in the callback.
Supported face recognition triggers
ID/Card trigger (only in 1:1 comparison mode)
Automated trigger (On face detection)
External trigger. Can be done with manual triggers through the device or the PC
External trigger steps:
Set CORE_FR_MATCH_API_CALLED attribute to true
Then start the face method of MainActivity through Intent.
Interface call example:
xxxxxxxxxx
1. SettingsManager.getInstance().set(BBoxUtils.CORE_FR_MATCH_API_CALLED, "true");
2. ComponentName componentName = new ComponentName("com.opnext.face", "com.opnext.face.MainActivity");
3. Intent intent = new Intent();
4. intent.setComponent(componentName);
5. startActivity(intent);
FaceSec’s Facial Recognition Terminal Platform: device software platform with open development support, and support for customizable business processes support through ODSL. The terminal itself supports functions such as the management of personnel, the setting of general and identification parameters, and the storage and upload of identification records.
FaceSec Facial Recognition Cloud Management Platform: referred to as cloud management platform; a back-end management system that coordinates and manages cloud service mode devices. The platform supports unified management and operation of batch terminals, the management of personnel and organizations and related access permissions, the management of platform account permissions, and the management of platform applications.
Single-host mode: One of the two operating modes of the device. It does not synchronize with the cloud platform and connects to the internet independently. In this mode, the terminal can add and manage personnel and access permissions locally, and stores access records locally.
Cloud service mode: One of the two operating modes of the device, used in conjunction with the platform. In this mode, both the platform and the device manage the device's facial recognition related parameter settings, and access records will be automatically uploaded to the cloud platform.
Terminal operating mode: The operating modes of the devices are divided into single-host mode and cloud service mode. The difference between the two is that the cloud service model is used with the cloud management platform, while the single-host model indicates the device functions independently. In cloud service mode, the cloud management platform can issue commands to the device.
Personnel rules: access rules for personnel, which describe when and via which verification methods personnel can use with the device, or when the personnel are not allowed to attempt to access through the device.
Device rules: the device’s access rules, describing the time periods during which the terminal will allow personnel to attempt access. Device rules are a combination of device time attributes and device group parameters. Priority is higher than personnel rules. Will take the intersection of the result of personnel rules when judging access rights.
1:N mode: refers to the current single snapshot (1) and the personnel library (N individuals) are compared N times in sequence. Derives the score of N and take the highest score as the best choice. If the highest score exceeds the set threshold, the comparison passes and the two images are considered as having the same subject. Otherwise, the comparison fails and the two are considered distinct.
1:1 mode: refers to a comparison between a single snapshot (1) and a specified photo (1). Dervies a score, which if it exceeds the set threshold, the comparison is determined to be successful, and the two are considered to contain the same subject. Otherwise, the judgment fails and the two are considered distinct. There are two ways to obtain designated photos: 1. Swipe an ID card and read the photos stored in the ID card. 2. Swipe IC card or enter through Wiegand and search for the corresponding personnel's photo in the database by card number.
Hybrid mode: Support 1:N mode at the same time on the basis of supporting 1:1 mode.
Access records: personnel access records, the records generated by personnel after verification on the terminal, including captured photos, passing time, personnel information, etc.
Activation code: If you select the online mode when the device is activated, you need to enter the platform IP and then enter the platform’s current activation code to complete the activation. The activation code is a 12 character alphanumeric string, and is case-insensitive.
Regulars: Permanent personnel, allowed access by default unless deleted, ruled by cyclical time periods. Generally used for full-time personnel such as employees and in households. Judgment priority: Regulars > visitors.
Visitors: personnel with temporary access, typically only allowed access within a specified period of time. After the specified timeframe expires, the terminal will automatically delete the person.
Personnel database: The personnel database stored locally on the terminal, including all personnel delivered from the platform or imported locally.
Local library: The personnel exist in the local personnel library of the terminal device.
ID check: Check whether the photo of the ID card and the face photo captured by the holder match.
Threshold: The facial comparison algorithm will score the result of the image comparison. The threshold serves as the minimum passing score for determining if two images feature the same subject.
Image quality assessment: The quality of the photo is scored through three aspects: the offset angle of the face, the sharpness of the photo, and whether the face is occluded. These three parameters are used to filter photos which may affect the recognition accuracy.
Recognition parameter library: an item in personnel details, which is used to specify the threshold used for the specified personnel during facial recognition on the device.
Access control signal: Wiegand signal format setting for terminal input and output.
Quick scenario: Liveness detection is deactivated. It is suitable for usage scenarios with a lot of personnel, and high requirements for recognition speed.
Secure scenario: Live detection is enabled It is suitable for usage scenarios with stricter security requirements.
Liveness detection: The device assesses whether the identified object is a living body, that is, a real person, as opposed to a printed image.
Rolling deletion: When the capacity of access records reaches the set upper limit of available disk space, the terminal will automatically delete the earliest records to free up space for new records.
Authorization list: Under 1:1 comparison mode, after facial image of the snapshot and the ID card are successfully matched, the device will subsequently check whether the card ID number exists in the device’s database. If the ID number exists in the database, the verification succeeds, and fails otherwise.
ODSL:Allows external developers to embed their application into the recognition process without needing to modify the source code. It combines configuration and external developer’s app to build functional extensions. This process only supports the expansion and embedding of new processes onto existing procedures, and cannot modify existing processes.
Android devices will need to import the SDK package (com.beeboxes.sdk.jar) to the compileonlylibs directory.
The PC client will need to import the serial SDK package (SerialTransport.jar) to the libs directory.
The serial demo is executed for the first time, the system will kill the process and cause a crash when the USB read and write permissions are granted. The process can be simply restarted without affecting functionality.
Parameter type | Field type | Field |
Restrictions |
---|---|---|---|
Personnel details |
Required |
Name |
Required, text input, between 1-64 characters. |
Personnel ID |
Required, must be unique, text input, between 1-32 characters. |
||
Image |
Optional, supports image upload. jpg, png, bmp format. Resolution at least 320*320px, max size of 10MB. |
||
Password |
Optional, text input, between 6-20 characters. |
||
Gender |
Optional, drop-down single selection, default is "Please select". When the user does not choose to add as a regular, the default gender is "blank". |
||
Organization |
Optional, drop-down single selection. The default is the root organization (the organization name must ne unique). |
||
|
Optional, text input, between 4-64 characters. |
||
Phone |
Optional, text input, between 4-64 characters. |
||
IC card no. |
Optional, text input, between 0-32 characters. |
||
Access card no. |
Optional, text input, between 0-32 characters. |
||
ID no. |
Optional, text input, between 0-32 characters. |
||
Recognition Parameter Library Name |
Optional, drop-down single selection, the default is "default", the specific drop-down option needs to read the platform creation item (the only one in the tenant, the maximum length is [1~64]) |
||
Optional |
Registration Date |
Optional, format: YYYY-MM-DD |
|
Position |
Optional, text input, between 0-64 characters. |
||
Notes |
Optional, text input, between 0-256 characters. |
||
Additional fields |
Optional, text input, between 0-32 characters. Up to 10 additional fields can be created. |
||
Device |
- |
Device Name |
Optional, text input, can benon-unique. Between 1 to 64 characters. When the device is not named, the device is listed is displayed as "Unnamed device", and the terminal is blank. |
- |
Device Group Name |
Required, text input, can be non-unique. Between 1-64 characters. |
|
Personnel Rule |
- |
Access Rule Name |
Required, text input, must be unique. Between 1-64 characters. |
- |
Rule Description |
Optional, text input, between 0-64 characters. |
|
- |
Time Rule Name |
Required, text input, must be unique. Between 1-64 characters. |
|
Access Record |
- |
Details |
Photo (registration, snapshot), personnel name, personnel number, verification result, time (access time, accurate to the second), scoring, recognition parameter library, personnel rules, access method, ID no., gender, nationality, birthdate (year, month, day), address, country code, place of issue, issuing authority, date of issue, expiration date The above fields are read according to the personnel's access method. If the access method is changed and some fields are blank/contain invalid information, these field will be hidden. |
Device Activation Code |
- |
- |
12 characters (alphanumeric, case-insensitive). This code is randomly generated by the system and can be used by multiple devices. However, this is unique, and should not be reused. |