Note: This feature requires an additional permission and must be explicitly requested
The "Lookup Flow" it's the same as the "Enrollment Flow" with the only difference that the first step is not the automatic scanning of a document through the camera phone but the user is asked to manually type in some information of the document that can be used to perform the lookup on the government database. Only one document at the time is supported. Other features like facial recognition and background check can be enabled in the same way as per the "Enrollment Flow". Note that not all the documents are supported.
In order to use our SDK you need an authorization token. Please check our API "Authorisation " in this regard.
Android
Add the following code at the start-up of your application to initialise the SDK:
Copy IO . Uqudo . Sdk . Core . UqudoSDK . Init ( this );
To check if a document supports lookup and lookup + facial recognition you can use the below methods:
Copy ....
bool isLookupSupported = IO . Uqudo . Sdk . Core . Domain . Model . DocumentType . NgaVoterId . LookupSupported ;
bool isLookupFacialRecognitionSupported = IO . Uqudo . Sdk . Core . Domain . Model . DocumentType . NgaVoterId . LookupFacialRecognitionSupported ;
....
Below, you can find an example on how to initiate the lookup flow:
Copy var uqudoLookupBuilder = new IO . Uqudo . Sdk . Core . UqudoBuilder . Lookup ();
bool isLookupFacialRecognitionSupported = IO . Uqudo . Sdk . Core . Domain . Model . DocumentType . NgaVoterId . LookupFacialRecognitionSupported ;
if (isLookupFacialRecognitionSupported)
{
var facialRecognitionConfigurationBuilder = new IO . Uqudo . Sdk . Core . Builder . FacialRecognitionConfigurationBuilder ();
facialRecognitionConfigurationBuilder . SetLookupMinimumMatchLevel ( 4 );
uqudoLookupBuilder . EnableFacialRecognition ( facialRecognitionConfigurationBuilder . Build ());
}
var backgroundCheck = new IO . Uqudo . Sdk . Core . Builder . BackgroundCheckConfigurationBuilder ();
backgroundCheck . SetBackgroundCheckType ( IO . Uqudo . Sdk . Core . Domain . Model . BackgroundCheckType . Rdc );
uqudoLookupBuilder . EnableBackgroundCheck ( backgroundCheck . Build ());
uqudoLookupBuilder . SetToken (token);
uqudoLookupBuilder . SetDocumentType ( IO . Uqudo . Sdk . Core . Domain . Model . DocumentType . NgaNin );
StartActivityForResult ( uqudoLookupBuilder . Build ( this ) , 101 );
In order to evaluate all the possible options please refer to section Lookup 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:
Copy using UqudoSDK ;
.. .
{
[ Register ( "AppDelegate" )]
public class AppDelegate : UIResponder, IUIApplicationDelegate
.. .
[ Export ( "application:didFinishLaunchingWithOptions:" )]
public bool FinishedLaunching ( UIApplication application , NSDictionary launchOptions)
{
new UQBuilderController ();
return true ;
}
To check if a document supports lookup and lookup + facial recognition you can use the below methods:
Copy ....
UQDocumentConfig documentConfig = new UQDocumentConfig (( int ) DocumentTypeID . NgaNin );
bool isLookupSupported = documentConfig . IsLookupFacialRecognitionSupported ;
bool isLookupFacialRecognitionSupported = documentConfig . IsLookupSupported ;
.. .
Below, you can find an example on how to initiate the lookup flow:
Copy using UqudoSDK ;
.. .
var builderController = UQBuilderController . DefaultBuilder ();
builderController . AppViewController = this ;
builderController . Delegate = new UqudoBuilderControllerDelegate ();
var lookupBuilder = new UQLookupBuilder ();
lookupBuilder . DocumentType = DocumentTypeID . NgaVoterId ;
var documentConfig = new UQDocumentConfig (( int ) DocumentTypeID . NgaVoterId );
bool isLookupFacialRecognitionSupported = documentConfig . IsLookupFacialRecognitionSupported ;
if (isLookupFacialRecognitionSupported)
{
lookupBuilder . EnableFacialRecognition = true ;
lookupBuilder . FacialRecognitionMinimumMatchLevel = 4 ;
}
lookupBuilder . AuthorizationToken = token;
builderController . SetLookup (lookupBuilder);
builderController . PerformLookup ();
....
UqudoBuilderControllerDelegate.cs
Copy using UqudoSDK ;
.. .
namespace < Your Project Namespace >
{
public class UqudoBuilderControllerDelegate : UQBuilderControllerDelegate
{
public UqudoBuilderControllerDelegate ()
{
}
public override void DidLookupFlowCompleteWithInfo ( string info)
{
System . Diagnostics . Debug . WriteLine (info);
}
public override void DidLookupFlowIncompleteWithStatus ( UQSessionStatus status)
{
System . Diagnostics . Debug . WriteLine (status);
}
}
}
In order to evaluate all the possible options please refer to section Lookup 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.