Nutrient 8.9 migration guide
This guide provides the necessary steps for migrating from Nutrient Android SDK 8 to Nutrient Android SDK 8.9.
Before updating to Nutrient Android SDK 8.9, make sure your app is running at least Nutrient Android SDK 8. If you’re running an earlier version, see our previous migration guides first, which will guide you through the necessary update steps up to version 8.9.
Upgrading Nutrient
Inside your
app/build.gradle.kts
file, update the version of theio.nutrient:nutrient
dependency to8.9.0
:dependencies {implementation("io.nutrient:nutrient:8.8.0")implementation("io.nutrient:nutrient:8.9.0")}Upgrading OCR dependencies
If your project also integrates the Nutrient OCR library, make sure to upgrade the version of all OCR dependencies too:
dependencies {implementation("io.nutrient:nutrient-ocr:8.8.0")implementation("io.nutrient:nutrient-ocr-english:8.8.0")implementation("io.nutrient:nutrient-ocr:8.9.0")implementation("io.nutrient:nutrient-ocr-english:8.9.0")...}API changes
Nutrient Android SDK 8.9 introduces a simplified digital signing API designed to make it easier to add ETSI(opens in a new tab) standard PAdES(opens in a new tab) advanced digital signatures to your documents. There are a few breaking API changes that this version brings, so if you’re using any of the digital signature APIs, read carefully.
From this release,
Signer
and all its child classes — likeMemorySigner
andPkcs12Signer
— are deprecated. Instead, useSigningManager
, which enables you to sign documents with ease:val signerOptions = SignerOptions.Builder(signatureFormField, outputFileUri).setPrivateKey(key).build()SigningManager.signDocument(context = context,signerOptions = signerOptions,type = digitalSignatureType,onFailure = { /* Handle signing errors here..*/ },onSuccess = { /* The document was successfully signed! */ })