Facia' Flutter Core SDK
Table of contents
- 1. Introduction
- 2. Scope
- 3. Purpose
- 4. Technology Stack
- 5. Features/EndPoints
- 6. Dependencies
- 7. Environments
- 8. Revision History
1. Introduction
This is the simplest and basic Flutter SDK which provides 3D Liveness & Match to Photo ID features. SDK captures proofs for the required feature and sends to the API to get the result.
This SDK provides two types of verification:
1. 3D Liveness
Facia will detect user's face and after capturing proof it will send the request to the API to check Face Liveness, this request maybe of Quick Liveness, Detailed Liveness, Additional Liveness or Default Liveness.
The SDK provides 4 types of 3D Liveness Verification:
Quick Liveness
SDK will capture a single frame after detecting the face and will send it to API for checking Liveness.
Detailed Liveness
SDK will record a video after detecting the face and will send it to API for checking Liveness.
Additional Liveness
SDK will capture a single frame and will check its liveness through API, if liveness is rejected it will move to the Additional Liveness.
Default Liveness
SDK will work as Additional liveness if the device is not rooted, if the device is rooted, it will take the user directly to the detailed liveness.
2. Match to Photo ID
SDK will verify the Liveness through Quick Liveness process, if liveness will verify it will capture the document to check the Face image with the image on the document.
2. Scope:
The scope of this document is solely for the developer's understanding of the code structure.
3. Purpose
This document has been compiled to assist developers and technical experts in the integration of Facia’s API with their mobile-based platforms and applications.
This guide has been designed to explain the use of verification services and the technical processes involved in the authentication process. Users are apprised of the different kinds of verification data that is required by the API, as well as the data formats that are required to forward verification data.
4. Technology Stack
4.1 Supported Platform
- Android 5.0 (API level 21) or higher.
- iOS 11 or higher.
4.2 General requirements
-
Internet connection
-
Supported architectures in SDK:
armeabi-v7a, x86, arm64-v8a, x86_64
4.3 Permissions
Camera permission is required by Facia to function properly.
4.4 Development Environment Setup:
4.5 Installation
- Clone the required project from gitlab repository by running following command in terminal
- Open the cloned project in android studio.
4.6 Development Structure:
4.7 Code Architecture:
The flutter plugin is basically a bridging between Android and iOS native SDKs into flutter native module. The structure followed in Android and iOS modules is HMVC & MVC respectively.
5. Features/EndPoints
Flutter plugin does not uses any specific endpoint, instead native android and iOS modules are integrated in this plugin. So, all the endpoints in native SDKs are used in this.
5.1 Create Transaction API
This is the main API of mobile application in which after capturing proofs we are submitting the proofs, this API is used for QL, DL & Photo to ID Match.
https://app.facia.ai/backend/api/transaction/create-transaction
5.2 Check Liveness API
This API is used to send the captured proofs of QL & DL in case of Additional liveness if QL is failed, basically when QL is failed in case of Additional liveness, we have to send QL' proof too with the DL proof for the session record.
5.3 Liveness Result API
This API is used to get the result of 3D liveness request.
https://app.facia.ai/backend/api/transaction/liveness-result
5.4 Feedback API
SDK takes the user' feedback after getting the result, this API is used to submit the feedback.
https://app.facia.ai/backend/api/transaction/create-feedback
6. Dependencies
No specific dependency is used in flutter plugin. Only the native SDKs are included in flutter's native module.
Android: https://gl.facia.ai/mobile_apps/facia_android_sdk#6-dependencies
iOS: https://gl.facia.ai/mobile_apps/facia-ios#6-dependencies
7. Environment:
Local
This environment is used for development and local testing before pushing the code to live environments. In local build, the SDKs are tested by directly installing the Facia module into the real devices.
Production Environment:
This environment is a live environment that is used by the general public and this must be 100% bug-free.
How to push/live change:
- Clone or pull the project from desired git repository.
- Fix the bug or develop a new feature.
- The changes are tested by the developers themselves.
- Update version in pubspec.yaml file of plugin.
- Update the CHANGELOG.md file.
- Make sure to check no credentials/token or unnecessary logs are present in main.dart file.
- Login in pub.dev website with Facia account.
- Open the terminal inside project cloned from "plugin-with-native-sdk" branch. Run command "flutter pub publish --dry-run".
- If everything goes well run command "flutter pub publish"
- The flutter plugin is now published on pub.dev
- Now, update demo app and documentation(update history and pub package verison). Push demo app to github and update documentation on https://developers.facia.ai/
Live demo app on github
- Clone Flutter' Sample app from github Sample App.
- Open pubspec.yaml file.
- Update "facia_mobilesdk" version to the latest one.
- Execute and test the application.
8. Revision History:
SDK Versions | Changes |
---|---|
1.0.0 | latest release of both iOS & Android SDK. |
1.0.1 | Improved functionality and stability |
1.0.2 | Improved design and flow. |
1.0.3 | Access token flow updated. |
1.0.4 | Passive Liveness improved. |
1.0.5 | Flow & design improved. |
1.0.6 | Passive liveness flow improved. |
1.0.7 | Improved functionality and stability. |
1.0.8 | Improved functionality and stability. |
1.0.9 | Improved functionality and stability. |
1.1.0 | Add support for android 14. |
1.1.1 | Improved functionality and stability. |
1.1.3 | Update dependencies. |
1.1.4 | Update dependencies. |
1.1.5 | Dim Light detection feature added. |
1.1.8 | Config object updated. |