In this section, we've included some examples of SDK usage below.

1. Open the Camera Scanner and Scan Documents

1.1. Start Scanner for Driver Licence and ID card

This section offers code samples to start scanners for the Driver Licence and ID card:

Code Sample:

private void LaunchDriverLicenceSDK() // function to launch driverlicence framework SDK
{
    ScanIDResultDelegate scanIDResultDelegate = new ScanIDResultDelegate(this);

    Orbit4ScanIDViewController anzVC = new Orbit4ScanIDViewController(scanIDResultDelegate);

    PresentViewController(anzVC, true, null);
}

1.1.2. Start the Scanner with the Document Type

📘

Note:

Please initialize the function to Launch the Driver Licence SDK first.

This section offers code samples to Start the scanners for the Drivers Licence and ID Card with a set of the document type.

Code Sample:

anzVC.RequestParam = "";

Below is an example of the use case of the document type code.

Code Sample:

private void LaunchDriverLicenceSDK()// function to launch driverlicence framework SDK
{
    ScanIDResultDelegate scanIDResultDelegate = new ScanIDResultDelegate(this);

    Orbit4ScanIDViewController anzVC = new Orbit4ScanIDViewController(scanIDResultDelegate);

    // Set Document Type
    anzVC.RequestParam = "AUS_AUTO_DRIVERLICENCE";

    PresentViewController(anzVC, true, null);
}

These are some compatible document types that can be used when Starting the scanner for specific document types:

"AUS_AUTO_DRIVERLICENCE"
"AUS_ACT_DRIVERLICENCE"
"AUS_NSW_DRIVERLICENCE"
"AUS_NT_DRIVERLICENCE"
"AUS_QLD_DRIVERLICENCE"
"AUS_SA_DRIVERLICENCE"
"AUS_TAS_DRIVERLICENCE"
"AUS_VIC_DRIVERLICENCE"
"AUS_WA_DRIVERLICENCE"
"AUS_IMMICARD"
"CAN_AB_DRIVERLICENCE"
"CAN_BC_DRIVERLICENCE"
"CAN_ON_DRIVERLICENCE"
"NZL_DRIVERLICENCE"

1.1.3. Enable/Disable Back Card Scan

📘

Note:

If back scanning is enabled, a dialog box will appear asking whether to continue scanning the back card or not when the front card scan is complete.

This section offers the code sample for enabling or disabling the back card scan.
You can set the value to True to enable the Back Card Scan.
You can set the value to False to disable the Back Card Scan.

Code Sample:

anzVC.ScanBackSide = ;// true to enable // false to disable

Below is an example of the use case of the back card scan code.

Code Sample:

private void LaunchDriverLicenceSDK()
{
    ScanIDResultDelegate scanIDResultDelegate = new ScanIDResultDelegate(this);

    Orbit4ScanIDViewController anzVC = new Orbit4ScanIDViewController(scanIDResultDelegate);

    // Set Document Type
    anzVC.RequestParam = "AUS_AUTO_DRIVERLICENCE";

    // To be enable back card scan here
    anzVC.ScanBackSide = true;

    PresentViewController(anzVC, true, null);
}

1.2. Start Scanner for Passport

This section offers code samples to start scanners for the Passport card:

Code Sample:

private void LaunchPassportSDK()
{
    MrzResultDelegate mrzResultDelegate = new MrzResultDelegate(this); 

    OrbitMrzViewController mrzVC = new OrbitMrzViewController(mrzResultDelegate);

    mrzVC.RequireImage = true;

    PresentViewController(mrzVC, true, null);
}

1.2.1. Scan Mode for Passport

📘

Note:

Please initialize the function to Launch the Passport SDK first.

The passport code function requires the scan mode to be a valid function.
There are 2 scan modes for Passport.
Below is the code to scan automatically.

Code Sample:

OrbitMrzScanMode.Camera

Below is the code to scan manually.

Code Sample:

OrbitMrzScanMode.Photo

Below is an example of the use case of the scan mode on the Passport card function.

Code Sample:

private void LaunchPassportSDK()
{
    MrzResultDelegate mrzResultDelegate = new MrzResultDelegate(this); 

    OrbitMrzViewController mrzVC = new OrbitMrzViewController(mrzResultDelegate);

    // Set Scan Mode
    mrzVC.ScanMode = OrbitMrzScanMode.Camera;
    mrzVC.RequireImage = true;

    PresentViewController(mrzVC, true, null);
}

1.3. Start Scanner for Medicare

This section offers code samples to start scanners for the Passport card:

Code Sample:

private void LaunchMedicareSDK() // function to launc Medicare SDK
{
    MedicareResultDelegate medicareResultDelegate = new MedicareResultDelegate(this);
    Orbit4MedicareViewController medVC = new Orbit4MedicareViewController(medicareResultDelegate);

    PresentViewController(medVC, true, null);
}

1.3.1. Medicare Document Type

Medicare has a specific document type for the function to be valid.
Below are the document type function required for Medicare.

Code Sample:

medVC.RequestParam = "AUS_MEDICARE";

📘

Note:

The Medicare document type must be set to "AUS_MEDICARE".

2. Camera UI Customisation

The Camera UI may be customized in a variety of ways. The following is an example of some of the customization:

2.1. Add a Header Title and Subtitle Message

The attributes exists for all 3 frameworks (MRZ, 4ScanID and Medicare). The main attributes to look for are:

  • overlayHeaderLabelColor
  • overlayHeaderLabelTextSize
  • overlayHeaderLabelText
  • overlaySubLabelColor
  • overlaySubLabelTextSize
  • overlaySubLabelText

📘

Note:

4ScanID is the Binding.

Please find the following code below for an example of the code above.

Code Sample:

orbitVC.OverlayHeaderLabelColor = UIColor.White;
orbitVC.OverlayHeaderLabelFont = UIFont.BoldSystemFontOfSize(20);
orbitVC.OverlayHeaderLabelText = "Australia Driver Licence";

orbitVC.OverlaySubLabelColor  = UIColor.White;
orbitVC.OverlaySubLabelFont = UIFont.BoldSystemFontOfSize(12);
orbitVC.OverlaySubLabelText = "Put your driver licence in this frame";

The graphic below illustrates how the overlay's code above is implemented in your project application's Camera UI.

11251125

The following are the descriptions from number one to two:

  1. The Overlay Text Box. This text box is located in the middle of the screen.
  2. The Overlay Header Label. This is the heading of the overlay text.
  3. The Overlay Header Label Color. This is the font color of the overlay header.
  4. The Overlay Header Label Color Text Size. This is the font size of the overlay header.
  5. The Overlay Sub Label Text. This is the subheading of the overlay text.
  6. The Overlay Sub Label Text Color. This is the font color of the subheading text.
  7. The Overlay Sub Label Text Size. This is the font size of the subheading text.

2.2. Hiding of Branding and Buttons on the Camera UI

To set the hiding of the branding and buttons on the Camera UI, please refer to the code sample below.

Code Sample:

orbitVC.closeButton.buttonVisible = true
orbitVC.settingButton.buttonVisible = true
orbitVC.recaptureButton.buttonVisible = false
orbitVC.cameraSwitchButton.buttonVisible = true
orbitVC.manualEntryButton.buttonVisible = true
orbitVC.useThisImageButton.buttonVisible = false

The graphic below illustrates how the hiding of the branding and buttons on the Camera UI's code above is implemented in your project application's Camera UI.

11251125

The following are the descriptions from number one to four:

  1. The Close Button. This functions to close the scanning process.
  2. The Setting Button. This functions to open the scanning process's settings.
  3. The Camera Switch Button. This functions to toggle between the front and rear cameras.
  4. The Manual Entry Button. This button has no action value, it closed the camera control.

2.3. Customize the colors of the Preview Screen

🚧

Important:

This feature is still in experimental settings and may not work well, proceed with caution.

The colors of the Preview Screen can be customized using the 4ScanID framework.
Below are the available properties to customize the Preview Screen on the 4ScanID framework.

Code Sample:

public virtual UIColor BackColor;
public virtual UIColor BodyFontColor;
public virtual UIColor BodyDetailFontColor;
public virtual UIColor HeaderFontColor;
public virtual UIColor ButtonFontColor;

2.4. Set Date Format

The Date Format can be set, please see the code below.

Code Sample:

orbitVC.DateFormat = "DD/MM/YYYY";

Here is the date format that our SDKs support:

Date Format

Display Name

DD/MM/YYYY

31/12/2015

DD/MM/YY

31/12/15

MM/DD/YYYY

12/31/2015

MM/DD/YY

12/31/15

DD MMM YYYY

31 Dec 2015

DD MMMM YYYY

31 December 2015

The graphic below illustrates how the date format code above is implemented in your project application's Camera UI. The Date format appears on the setting section after clicking the Setting button.

11251125

2.5. Set Camera Orientation

The Camera Orientation can be set, please see the code below.

Code Sample:

orbitVC.CameraViewOrientation = OrbitMrzCameraViewOrientation.Portrait;

The graphic below illustrates how the camera orientation code above is implemented in your project application's Camera UI. The camera orientation appears on the setting section after clicking the Setting button.

11251125

2.6. Show Capture Preview

Show Capture Preview is a feature where you can preview the document prior to taking a picture of that document. To show capture preview put true value and false value not to show capture preview. Please refer to the code sample below:

public boolean showCapturePreview = true;

The graphic below illustrates how the show capture preview code above is implemented in your project application's Camera UI. The show capture preview appears in the setting section after clicking the Setting button.

11251125

3. Understanding the Result

Once data has been captured and processed, it will be returned to the respective framework delegate functions.
Below is a sample code for the delegate functions:

3.1. Driver Licence and ID Card Results

The Driver Licence and ID card result delegate functions.

Code Sample:

public class ScanIDResultDelegate : Orbit4ScanIDResultDelegate {
}

To star result on the Driver's License and ID card, Insert the following code on the delegate function above.

Code Sample:

public override void Result(Orbit4ScanIDViewController sdkVC, ScanIDOCRResult result, UIImage imgDocF, UIImage imgDocB, UIImage imgDocFace, UIImage imgCamFace)
{
    rootVC.DismissViewController(true, () => {
        var resultStr = "";
        if (result.StatusCode != "200")
        {
            resultStr = "Failed! Status code " + result.StatusCode;
        }
        else
        {
            resultStr += result.ResultString;
        }

        rootVC.lblResult.Text = resultStr;
    });
}

The result of the aforementioned Driver's license above will be returned in an object such as ScanIDOCRResult in a JSON format. Inside ScanIDOCRResult, you can access data such as the card type, license type, and user's personal information. Result details are shown in the following found in the header:

public virtual ScanIDResultField CardType;
public virtual ScanIDResultField CountryOfIssue;
public virtual ScanIDResultField Issuer;
public virtual ScanIDResultField LastName;
public virtual ScanIDResultField FirstName;
public virtual ScanIDResultField MiddleName;
public virtual ScanIDResultField DOB;
public virtual ScanIDResultField ExpiryDate;
public virtual ScanIDResultField LicenceNumber;
public virtual ScanIDResultField Address;
public virtual ScanIDResultField Street;
public virtual ScanIDResultField City;
public virtual ScanIDResultField State;
public virtual ScanIDResultField ZipCode;
public virtual ScanIDResultField LicenceClass;
public virtual ScanIDResultField LicenceCondition;
public virtual ScanIDResultField LicenceType;
public virtual ScanIDResultField Expired;
public virtual ScanIDResultField Over18;

public virtual string StatusCode;
public virtual string StatusMessage;
public virtual string ResultString;

3.2. Passport Results

The Passport result delegates functions.

Code Sample:

public class MrzResultDelegate : OrbitMrzViewControllerDelegate {
}

To star result on the Passport, Insert the following code on the delegate function above.

Code Sample:

public override void WithImage(MRZOCRResult response, UIImage image, UIImage imgFace, OrbitMrzViewController orbitCreditViewController)
{
    rootVC.DismissViewController(true, () => {
        var resultStr = "";
        if (response.StatusCode != "200")
        {
            resultStr = "Failed! Status code " + response.StatusCode;
        }
        else
        {
            resultStr += response.ResultString;
        }

        rootVC.lblResult.Text = resultStr;
    });
}

The result of the aforementioned Passport above will be returned in an object such as MRZOCRResult in a JSON format. Inside MRZOCRResult, you can access data such as the document type, and user's personal information. Result details are shown in the following found in the header:

public virtual MRZResultField DocumentType;
public virtual MRZResultField CountryOfIssue;
public virtual MRZResultField LastName;
public virtual MRZResultField FirstName;
public virtual MRZResultField MiddleName;
public virtual MRZResultField DocumentNumber;
public virtual MRZResultField Nationality;
public virtual MRZResultField DateOfBirth;
public virtual MRZResultField Sex;
public virtual MRZResultField DateOfExpiry;
public virtual MRZResultField PersonalNumber;

3.3. Medicare Results

The Medicare result delegates functions.

Code Sample:

public class MedicareResultDelegate : Orbit4MedicareResultDelegate {
}

To star result on the Medicare, Insert the following code on the delegate function above.

Code Sample:

public override void Result(Orbit4MedicareViewController sdkVC, MedicareOCRResult result, UIImage frontImage, UIImage backImage, UIImage faceImage)
{
    rootVC.DismissViewController(true, () => {
        var resultStr = "";
        if (result.StatusCode != "200")
        {
            resultStr = "Failed! Status code " + result.StatusCode;
        }
        else
        {
            resultStr += result.ResultString;
        }

        rootVC.lblResult.Text = resultStr;
    });
}

The result of the aforementioned Medicare above will be returned in an object such as MedicareOCRResult in a JSON format. Inside MedicareOCRResult, you can access data such as the card type, and user's personal information. Result details are shown in the following found in the header:

public virtual MedicareResultField CardType;
public virtual MedicareResultField CountryOfIssue;
public virtual MedicareResultField Issuer;
public virtual MedicareResultField MedicareId;
public virtual MedicareResultField IdentifierNo;
public virtual MedicareResultField IssueNo;
public virtual MedicareResultField CheckSum;
public virtual MedicareResultField User1;
public virtual MedicareResultField User2;
public virtual MedicareResultField User3;
public virtual MedicareResultField User4;
public virtual MedicareResultField User5;
public virtual MedicareResultField ValidTo;
public virtual MedicareResultField Mark;
public virtual MedicareResultField Hologram;
public virtual MedicareResultField CardColor;
public virtual string StatusCode;
public virtual string StatusMessage;
public virtual string ResultString;

💬 We're here to help!

If you encounter an issue, a bug, or require assistance, please contact our support page here to find the solution. Don't forget to provide any important information on the issue.