Nutrient 6.2 migration guide
This article provides a set of guidelines for migrating from Nutrient Android SDK 6.1 to Nutrient Android SDK 6.2.
Updated build versions
With Nutrient 6.2, we updated various build properties and versions.
-
Build system dependencies
-
The Android Gradle plugin used to build Nutrient was updated to version 3.5.3. In addition, all sample applications now use Android Gradle plugin 3.5.3 as well.
-
Deprecations
Here’s a list of fields and methods that have been deprecated:
-
PSPDFKitViews#getFragment()
was deprecated. UsegetPdfFragment()
orrequirePdfFragment()
instead. -
setPdfView()
,performApplyConfiguration()
,getPdfParameters()
, andgetHostingActivity()
inPdfActivity
andPdfUiFragment
were deprecated. These symbols will be removed with the next major version. Contact support if you are using any of them.
Renaming of private API packages
With PSPDFKit 6.2 for Android, we refactored our framework’s private APIs and moved them to different packages. This change was done to improve the naming of private APIs and to lower the chance of accidental misuse. The following packages have been renamed:
-
com.pspdfkit.framework
was renamed tocom.pspdfkit.internal
. -
com.pspdfkit.instant.framework
was renamed tocom.pspdfkit.instant.internal
.
The use of classes inside these packages is not supported and will lead to breaking code changes or unexpected behavior. For more information on private API usage, see our guide about unsupported private symbols.
Hiding private symbols
PdfUiImpl
was incorrectly exposed in the public package. With Nutrient Android SDK 6.2, we made this class internal. If you were using it, contact support.
In addition to this change, we also removed the following methods from PdfFragment
, as they are not meant for public use:
-
getPasteManager()
-
getViewCoordinator()
(protected method) -
setDocument()
(protected method) -
onPageRotationOffsetChanged()
-
onInternalDocumentSaved()
-
onInternalDocumentSaveFailed()
-
onPageBindingChanged()
Changed annotation defaults
We changed multiple defaults for annotation properties to make them consistent with Nutrient for iOS and Web:
-
Changed the default free text annotation size from 16pt to 18pt
-
Changed the default line/border thickness of all shape annotations (i.e. ink, line, square, circle, polygon, and polyline) from 10pt to 5pt
-
Changed the default eraser thickness from 20pt to 13pt
-
Changed the eraser thickness range from 10–50pt to 1–40pt
-
Changed the default cloudy effect intensity from 5 to 2 (this property has no unit)
Updated property inspector
We replaced our custom bottom sheet implementation used by the PropertyInspectorCoordinatorLayout
with the implementation from the Material Components library. In addition, we optimized inspector behavior to make it more predictable. This includes the following changes:
-
Inspector is now always resized to its content’s size (capped by the available screen space).
-
PropertyInspector
no longer supports resizing, so itssetResizable()
andisResizable()
methods have been deprecated.