React Native
Overview
Android
- Minimum Android version:
4.4 (API Level:19)
- Compilation Android SDK version:
API Level:34
- Supported CPU architectures:
armeabi-v7a
,arm64-v8a
- Use-permissions:
<uses-feature android:name="android.hardware.camera" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.CAMERA" />
- Set the largeHeap property to true (strongly recommended)
<application android:largeHeap="true" />
iOS
- Minimum iOS version:
iOS 12.0
- Supported CPU architectures:
arm64
- SDK incremental package size:
~0.7M
- Use-permissions:
NSCameraUsageDescription
pub.dev dependency
-
Add pub spec.yaml dependency
dependencies: iqa_plugin: ^1.4.0
-
For the iOS platform,the following configurations need to be added:
-
Add camera usage description in
Info.plist
as below. Ignore this step if you have added those<key>NSCameraUsageDescription</key> <string>Use the camera to detect the face movements</string>
-
Add the following code to the
podfile
file in your projecttarget 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) pod 'SolutionH5', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-Solution-SDK/1.2.0/iOS-SolutionH5-V1.2.0.tar.bz2', type: :tbz end
-
Quick Start
-
Declare the plugin.
import 'package:iqc_plugin/iqc_plugin.dart';
-
Initialize the SDK.
void main() { WidgetsFlutterBinding.ensureInitialized(); GlobalIQCPlugin.initialize(); runApp(MyApp()); }
-
Get the SDK version number.
GlobalIQCPlugin.getSDKVersion.then((sdkVersion) { print(sdkVersion); });
-
Check license
The license is obtained by your server calling our openAPI, you need to check license before starting the IQA activity.
String license = "xxx"; String? result = await GlobalIQCPlugin.setLicenseAndCheck(license); print("result = " + result.toString()); if ("SUCCESS" == result) { startGlobalIQCDetection(); } The returned values of checkResult: APPLICATION_ID_NOT_MATCH: The package name is not within the authorized scope, please check your package name. LICENSE_EXPIRE: The license has expired, please confirm that the user has calibrated the phone time. ERROR_LICENSE(1): The license parsing succeeded, but necessary authentication information is missing, this case generally will not occur. ERROR_LICENSE(2): The license parsing succeeded, but the internal format is incorrect, this case also generally will not occur. ERROR_LICENSE(3): It is highly likely that an incompatible SDK license is being used, such as using an IQA license for liveness detection. ERROR_LICENSE(4, 5): Parsing failed, please check if the license has issues like mismatched quotes, line breaks, etc.
-
User binding (highly recommended).
You can use this method to pass us your unique user ID, and we will establish a mapping relationship based on that ID. It's easy to track logs with us in case of problems.
GlobalIQCPlugin.bindUser("UserId");
-
Start and Get Results
We provide two ways to get images and detection results, you can get them directly through the SDK or you can request the results via IDVID.
Updated about 3 hours ago