Nutrient 2.1 migration guide

Prior to version 2.1, there were two different Nutrient activities: PSPDFActivity and PSPDFAppCompatActivity. Each of these had two different base classes, FragmentActivity and AppCompatActivity, respectively. Version 2.1 simplifies activities by only having a single PSPDFActivity that extends AppCompatActivity.

Below you’ll find the steps for migrating your app to Nutrient Android SDK 2.1.

  • Replace pspdfkit-2.0.x.aar with pspdfkit-2.1.aar.

  • If you have a custom Nutrient activity, let it extend com.pspdfkit.ui.PSPDFActivity.

  • Inside the AndroidManifest.xml:

    1. Use your custom activity or the default com.pspdfkit.ui.PSPDFActivity.

    2. Use an activity theme that extends Theme.AppCompat (important!).

The manifest entry should look similar to this:

<activity android:name="com.pspdfkit.ui.PSPDFActivity"
          android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
          android:windowSoftInputMode="adjustNothing" />