> For the complete documentation index, see [llms.txt](https://docs.uqudo.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uqudo.com/docs/kyc/uqudo-sdk/integration/xamarin/enrolment-flow.md).

# Enrolment Flow

**Android**

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

```csharp
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:

```csharp
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](/docs/kyc/uqudo-sdk/integration/android/enrolment-flow.md). 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:

```csharp
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:

```csharp
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

```csharp
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](/docs/kyc/uqudo-sdk/integration/ios/enrolment-flow.md). 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](/docs/kyc/uqudo-sdk/integration/android/enrolment-flow.md#handling-the-result)" for Android and the iOS documentation "[Handling the Result](/docs/kyc/uqudo-sdk/integration/ios/enrolment-flow.md#handling-the-result)" for iOS.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.uqudo.com/docs/kyc/uqudo-sdk/integration/xamarin/enrolment-flow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
