Skip to main content

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​

VersionChangeAction
3.0The SDK is delivered as two .aar libraries; third-party libraries are externalUpdate the dependencies
3.0onDocumentSigned receives more informationUpdate the listener
2.0One listener per event; customisation with a BundleUpdate 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:

LibraryProvides
mobbsign-sdk-android-3.x.x.aarThe MobbSign SDK.
mobb-commons-android-1.x.x.aarComponents 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:

onDocumentSigned
-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);