Migration guide
We recommend keeping the SDK up to date. This page lists the changes that require action in your code or build configuration.
Summary
| Version | Change | Action |
|---|---|---|
| 3.0 | The SDK is delivered as two .aar libraries; third-party libraries are external | Update the dependencies |
| 3.0 | onDocumentSigned receives more information | Update the listener |
| 2.0 | One listener per event; customisation with a Bundle | Update the listeners |
3.0
Libraries
Until 2.x the SDK was delivered as a JAR file. From 3.0 it is delivered as two .aar libraries, and the third-party libraries are no longer bundled, to avoid duplicated classes and version conflicts:
| Library | Provides |
|---|---|
mobbsign-sdk-android-3.x.x.aar | The MobbSign SDK. |
mobb-commons-android-1.x.x.aar | Components shared by Mobbeel products. |
Remove the JAR file and add the libraries and their dependencies as described in Installation.
Document signed listener
onDocumentSigned receives the encrypted signature data, the page and the coordinates of the signature:
-public void onDocumentSigned(byte[] document, Bitmap signatureBitmap)+public void onDocumentSigned(byte[] document, byte[] encryptedSignatureData,+Bitmap signatureBitmap, int signaturePage, Rect signatureCoord)
Signed custom fields
The new method addSignedCustomField(key, value) writes a field in the signed information of the signature. See Custom fields.
2.0
One listener per event
MobbSignProgressUpdater has been removed. Register a listener for each event you need, for example:
mobbSignView.setOnDocumentSignedListener((document, signatureBitmap) -> {
// The document has been signed
});
Customisation
The customisation properties are constants of MobbSignCustomizationProperties. Set them in a Bundle and pass it to the constructor of the view:
Bundle customizationBundle = new Bundle();
// Customisation properties
mobbSignView = new MobbSignView(this, customizationBundle);