Getting started with MobbSign
Overview
MobbSign is a solution that allows you to sign documents with legal validity using your handwritten signature using a mobile device (iPhone, iPad, Android smartphones and tablets ...).
With MobbSign you can improve and streamline your company processes, save money and say goodbye to paper.
Initialization
First step is always initializing the API. You need to this before any other action or SDK will not work. You need your license key to complete this step.
So, set up the license id and listen to the possible result:
public void ConfigureLicense(String license);
Configuring the SDK
Configure the public key that is going to be used to encrypt the biometric data embedded to the document:
MobbSignView.SetEncryptionKey(new Uri("ms-appx:///Assets/Keys/public.key"));
Define your own listeners and implement the events you need to know about:
this.MobbSignView.OnDocumentShown += MobbSignView_OnDocumentShown;
this.MobbSignView.OnSignatureAcquised += MobbSignView_OnSignatureAcquised;
this.MobbSignView.OnSignatureDeleted += MobbSignView_OnSignatureDeleted;
this.MobbSignView.OnDocumentSigned += MobbSignView_OnDocumentSigned;
this.MobbSignView.OnErrorOccurred += MobbSignView_OnErrorOccurred;
this.MobbSignView.OnProcessEnd += MobbSignView_OnProcessEnd;
this.MobbSignView.OnBackButtonPressed += MobbSignView_OnBackButtonPressed;
this.MobbSignView.OnSignButtonPressed += MobbSignView_OnSignButtonPressed;
this.MobbSignView.OnDocumentFormSaved += MobbSignView_OnDocumentFormSaved;
this.MobbSignView.OnCheckLicense += MobbSignView_OnCheckLicense;
this.MobbSignView.OnCheckEncryptionKey += MobbSignView_OnCheckEncryptionKey;
Start process
Once the API is initialized and the SDK is configured as you need it, you have to start a new scan process.
Let's go to load the document:
StorageFile selectedFile = e.Parameter as StorageFile;
if (selectedFile != null){
MobbSignView.LoadPDFDocument(selectedFile, "Sample document");
}
Different ways to load documents
- From document source:
public async Task LoadPDFDocument(StorageFile originFile, String name)
- From document source with data on editable document fields:
public async void LoadPDFDocument(StorageFile originFile, String name, Dictionary<string, object> inputFields)
- Passing data file content:
public async Task LoadPDFDocumentFromData(Byte[] data, String name)
- Passing data file content with preloading data on editable document fields:
public async void LoadPDFDocumentFromData(Byte[] data, String name, Dictionary<string, object> inputFields)