Face Session Flow

Android

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

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

Below you can find an example on how to initiate the face session process:

var faceSessionConfiguration = new IO.Uqudo.Sdk.Core.UqudoBuilder.FaceSession();
faceSessionConfiguration.SetSessionId("<your session identifier>");
faceSessionConfiguration.SetToken("<your token>");
StartActivityForResult(faceSessionConfiguration.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 Face Session Flow. The C# interface is the porting of the JAVA one.

iOS

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

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 on how to initiate the face session process:

var builderController = UQBuilderController.DefaultBuilder();
builderController.AppViewController = this;
builderController.Delegate = new UqudoBuilderControllerDelegate();
var faceSessionConfiguration = new UQFaceSessionBuilder();
faceSessionConfiguration.AppViewController = this;
faceSessionConfiguration.SessionId = "<your session identifier>";
faceSessionConfiguration.AuthorizationToken = "<your token>";
builderController.SetFaceSession(faceSessionConfiguration);
builderController.PerformFaceSession();

UqudoBuilderControllerDelegate.cs

using UqudoSDK;
...

namespace <Your Project Namespace>
{
	public class UqudoBuilderControllerDelegate : UQBuilderControllerDelegate
	{
	
    	public UqudoBuilderControllerDelegate()
    	{
    	}
    
        public override void DidFaceSessionCompleteWithInfo(string info)
        {
            System.Diagnostics.Debug.WriteLine(info);
        }
    
        public override void DidFaceSessionIncompleteWithStatus(UQSessionStatus status)
        {
            System.Diagnostics.Debug.WriteLine(status);
        }
    
	}
}

In order to evaluate all the possible options please refer to section Face Session Flow. The C# interface is 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