Search
⌃K
Links

Getting started

This page presents the first steps for using our SDKs in an Ionic application.

Privacy Policy and Terms & Conditions of Use

When using our plugin, please make sure that you agree with our Privacy Policy and our Terms and Conditions of Use.

Settings

Android

In the file ROOT_PROJECT/android/app/build.gradle, add:
android
...
dataBinding.enabled = true
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
​
aaptOptions {
noCompress "tflite"
}
}
Import the package and call the add() method inside the startup in android/app/src/main/java/io/ionic/starter/MainActivity.java:

DocumentDetector

import com.example.plugin.DocumentDetectorPlugin;
public class MainActivity extends BridgeActivity {
​
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
add(DocumentDetectorPlugin.class);
}});
}
}

PassiveFaceLiveness

import com.passive.PassiveFaceLivenessPlugin;
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
add(PassiveFaceLivenessPlugin.class);
}});
}
}

iOS

In the file ROOT_PROJECT/ios/App/Podfile, add to the end of the file:
source 'https://github.com/combateafraude/iOS.git'
source 'https://cdn.cocoapods.org/' # or 'https://github.com/CocoaPods/Specs' if the CDN is down
Finally, add the camera permission to the file ROOT_PROJECT/ios/App/Runner/Info.plist:
<key>NSCameraUsageDescription</key>
<string>To read the documents</string>

Ionic

Add the plugin to your ROOT_PROJECT/package.json file:
"dependencies": {
​
//Current stable versions
"document-detector-ionic": "https://github.com/combateafraude/Ionic/archive/refs/tags/document-detector-v6.6.0.tar.gz",
​
"passive-face-liveness-plugin": "https://github.com/combateafraude/Ionic/archive/refs/tags/passive-face-liveness-v6.1.0.tar.gz",
​
"face-authenticator-plugin": "https://github.com/combateafraude/Ionic/archive/refs/tags/face-authenticator-v2.7.0.tar.gz",
​
//Release candidates
"passive-face-liveness-plugin": "https://github.com/combateafraude/Ionic/archive/refs/tags/passive-face-liveness-v7.0.0-rc01.tar.gz"
​
}
Then run:
  1. 1.
    npm install
  2. 2.
    ion capacitor build < platform > [ options ]