Enrolment Flow

Android

Add the following code at the start-up of your application to initialize the SDK:

IO.Uqudo.Sdk.Core.UqudoSDK.Init(this);

Below you can find an example of how to initiate the enrolment process for a passport enabling the reading through NFC and facial recognition:

var uqudoEnrollmentBuilder = new IO.Uqudo.Sdk.Core.UqudoBuilder.Enrollment();
var documentBuilder = new IO.Uqudo.Sdk.Core.DocumentBuilder(this);
documentBuilder.SetDocumentType(IO.Uqudo.Sdk.Core.Domain.Model.DocumentType.Passport);
var readingConfiguration = new IO.Uqudo.Sdk.Core.Builder.ReadingConfigurationBuilder();
documentBuilder.EnableReading(readingConfiguration.Build());
var facialRecognitionConfigurationBuilder = new IO.Uqudo.Sdk.Core.Builder.FacialRecognitionConfigurationBuilder();
uqudoEnrollmentBuilder.EnableFacialRecognition(facialRecognitionConfigurationBuilder.Build());
uqudoEnrollmentBuilder.SetToken("<YOUR_AUTHORIZATION_TOKEN_HERE>");
uqudoEnrollmentBuilder.Add(documentBuilder.Build());
StartActivityForResult(uqudoEnrollmentBuilder.Build(this), 100);

...
protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data) {
   base.OnActivityResult(requestCode, resultCode, data);
   if (requestCode == 100) {
 	Console.WriteLine("JWS result" + data.GetStringExtra("data"));
   }
}

In order to evaluate all the possible options please refer to section Enrolment Flow. The C# interface is the porting of the JAVA one.

iOS

To initialize the SDK, within your AppDelegate class under FinishedLaunching instantiate UQBuilderController() as the following example:

using UqudoSDK;
...
{
[Register("AppDelegate")]
public class AppDelegate : UIResponder, IUIApplicationDelegate
...
[Export("application:didFinishLaunchingWithOptions:")]
public bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
  new UQBuilderController();
  return true;
}

Below you can find an example of how to initiate the enrollment process for a passport enabling the reading through NFC and facial recognition:

using UqudoSDK;
...

var builderController = UQBuilderController.DefaultBuilder();
builderController.AppViewController = this;
builderController.Delegate = new UqudoBuilderControllerDelegate();
var enrollmentBuilder = new UQEnrollmentBuilder();
enrollmentBuilder.AppViewController = this;
enrollmentBuilder.EnableFacialRecognition = true;
enrollmentBuilder.AppViewController = this;
var readingConfig = new UQReadingConfig();
readingConfig.EnableReading = true;
var documentConfig = new UQDocumentConfig((int)DocumentTypeID.Passport);
documentConfig.Reading = readingConfig;
enrollmentBuilder.Add(documentConfig);
builderController.SetEnrollment(enrollmentBuilder);
builderController.PerformEnrollmentWithToken("your token", null);

UqudoBuilderControllerDelegate.cs

using UqudoSDK;
...

namespace <Your Project Namespace>
{
	public class UqudoBuilderControllerDelegate : UQBuilderControllerDelegate
	{
	
    	public UqudoBuilderControllerDelegate()
    	{
    	}

    	public override void DidEnrollmentCompleteWithInfo(string info)
    	{
        	System.Diagnostics.Debug.WriteLine(info);
    	}

    	public override void DidEnrollmentIncompleteWithStatus(UQSessionStatus status)
    	{
        	System.Diagnostics.Debug.WriteLine(status.Message);
    	}

	}
}

In order to evaluate all the possible options please refer to section Enrolment Flow. The C# interface is the binding to the Objective-C one.

Android and iOS

To handle the result check the Android documentation "Handling the Result" for Android and the iOS documentation "Handling the Result" for iOS.

Last updated