Nutrient 5.2 migration guide

This article provides a set of guidelines for migrating from Nutrient Android SDK 5.1 to Nutrient Android SDK 5.2. If you’re upgrading from a version earlier than 5.1, review the Android 5.1 migration guide first.

Updated dependencies

With Nutrient 5.2, we updated various dependencies of Nutrient:

  • Maven dependencies

    • Kotlin to 1.3.20.

  • Build system dependencies

    • We updated all example projects and the internal Nutrient build system to Android Gradle plugin 3.3.0. The minimum supported Android Studio version is now also the latest stable version, 3.3.

  • Additional dependencies

    • The Android NDK used to build Nutrient was updated to 19.0.5232133.

    • The bundled SQLite binaries were updated to 3.26.0.

    • The Botan library was updated to version 2.9.0.

Notable changes and deprecations

  • Deprecates PSPDFKit#setLoggingEnabled(). Use PdfLog#removeAllLoggers() or a custom Logger that ignores all messages.

  • Removes the PdfActivityMenuManager class as well as PdfActivity#getActivityMenuManager(), as these did not add useful features to the public API.

  • Deprecates Signer#signFormField(SignatureFormField, BiometricSignatureData, OutputStream, OnSigningCompleteCallback). Use Signer#signFormField(SignerOptions, OnSigningCompleteCallback) instead.

  • Deprecates Signer#signFormFieldAsync(SignatureFormField, BiometricSignatureData, OutputStream). Use Signer#signFormFieldAsync(SignerOptions) instead.

  • PdfActivity#onPrepareOptionsMenu() no longer clears menu items added in PdfActivity#onCreateOptionsMenu(). You should use the onCreateOptionsMenu() to create your custom menu items and use the onPrepareOptionsMenu() only to modify the state of menu items when the menu gets shown.