---
title: "Nutrient 10.4 migration guide"
canonical_url: "https://www.nutrient.io/guides/android/migration-guides/10-4-migration-guide/"
md_url: "https://www.nutrient.io/guides/android/migration-guides/10-4-migration-guide.md"
last_updated: "2026-06-09T10:25:14.340Z"
description: "Lists important public API changes for Nutrient Android SDK 10.4."
---

This guide outlines the changes to Nutrient Android SDK 10.4.

## Deprecations removed

A lot of previous deprecations — from mid 2024 and earlier — have been removed from the SDK. All of these should have alternatives that were mentioned in the API documentation in previous versions. If you’re unable to migrate due to a certain method being removed and you’re unable to find a replacement, [contact our Support](https://support.nutrient.io/hc/en-us/requests/new) team.

## Annotation listeners and the annotation manager

We removed the `AnnotationManager` interface and moved related methods and annotation listener management to other places, outlined below. Internally, this code was very complex and led to a lot of confusion with multiple ways to do the same thing.

`AnnotationManager` was essentially a way of managing annotation event listeners. These listeners can also be managed via [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html), and [`AnnotationProvider`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.annotations/-annotation-provider/index.html).

### Listeners

- `com.pspdfkit.ui.special_mode.manager.AnnotationManager.OnAnnotationSelectedListener` is now `com.pspdfkit.ui.annotations.OnAnnotationSelectedListener`.

- `com.pspdfkit.ui.special_mode.manager.AnnotationManager.OnAnnotationDeselectedListener` has been merged into `com.pspdfkit.ui.annotations.OnAnnotationSelectedListener`.

- `com.pspdfkit.ui.special_mode.manager.AnnotationManager.OnAnnotationCreationModeChangeListener` is now `com.pspdfkit.ui.annotations.OnAnnotationCreationModeChangeListener`.

- `com.pspdfkit.ui.special_mode.manager.AnnotationManager.OnAnnotationEditingModeChangeListener` is now `com.pspdfkit.ui.annotations.OnAnnotationEditingModeChangeListener`.

- `com.pspdfkit.ui.special_mode.manager.AnnotationManager.OnAnnotationCreationModeSettingsChangeListener` is now `com.pspdfkit.ui.annotations.OnAnnotationCreationModeSettingsChangeListener`.

- `com.pspdfkit.ui.special_mode.manager.OnAnnotationSelectedListenerAdapter` has been removed, as these default implementations are now present in `com.pspdfkit.ui.annotations.OnAnnotationSelectedListener`.

All of these listeners can still be managed via their respective `add`/`remove` methods in [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html).

The original package name for the listeners is still available but is now deprecated. These listeners will be removed in 2026.

#### OnAnnotationUpdatedListener

[`AnnotationProvider.OnAnnotationUpdatedListener`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.annotations/-annotation-provider/-on-annotation-updated-listener/index.html) is in the same place, but registering and unregistering a listener can only be done via [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/add-on-annotation-updated-listener.html), and _not_ via [`AnnotationProvider`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.annotations/-annotation-provider/index.html).

## HTML conversion and WebView

### Breaking

- [`HtmlToPdfConverter.fromHtmlString()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.document.html/-html-to-pdf-converter/from-html-string.html) is now one method instead of two. Pass `null` for the `baseUrl` argument if you were using the two-argument method before.

- `isFileAccessAllowed` — Any methods in the SDK that take a file access Boolean (which is eventually passed to the `WebSettings` Android SDK method) have been removed due to a violation of security standards. See [below](#html-to-pdf-conversion-with-file-uris) for a workaround with HTML-to-PDF conversion.

- The  `com.pspdfkit.signatures.Signature.kt` constructor is private. From now on, the construction of the signature object is delegated to two static helper methods: ([`Signature.createInkSignature()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.signatures/-signature/-companion/create-ink-signature.html) and [`Signature.createStampSignature()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.signatures/-signature/-companion/create-stamp-signature.html)).

- `pspdf__electronicSignatureControllerViewStyle` is now removed, and its style attributes (`pspdf__fontSelectionVisible` and `pspdf__circleButtonBorderColor`) have been moved under `pspdf__signatureLayoutStyle`.

### Deprecations

- `HtmlToPdfConverter.fromHTMLString()` has been deprecated in favor of [`HtmlToPdfConverter.fromHtmlString()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.document.html/-html-to-pdf-converter/from-html-string.html).

### HTML-to-PDF conversion with file URIs

This version will break HTML-to-PDF conversion using the [URI API](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.document.html/-html-to-pdf-converter/from-uri.html) with files on the file system outside of assets or resources. This is due to security issues with the [`setAllowFileAccess` API](https://developer.android.com/reference/android/webkit/WebSettings#setAllowFileAccess(boolean)). To work around this issue, we’ve added the `WebViewSecurityPolicy` class, which allows you to edit the `WebSettings` in your code:

```kotlin

WebViewSecurityPolicy.webViewSettingsCustomizer = object : WebViewSettingsCustomizer {
    override fun customize(settings: WebSettings) {
        settings.allowFileAccess = true
    }
}

```

## Other

- The `pspdf_formHighlightColorLight` color ID has been corrected to `pspdf__formHighlightColorLight`.
---

## Related pages

- [10 3 Migration Guide](/guides/android/migration-guides/10-3-migration-guide.md)
- [10 5 Migration Guide](/guides/android/migration-guides/10-5-migration-guide.md)
- [2024 9 Migration Guide](/guides/android/migration-guides/2024-9-migration-guide.md)
- [2024 8 Migration Guide](/guides/android/migration-guides/2024-8-migration-guide.md)
- [Pspdfkit 2 1 Migration Guide](/guides/android/migration-guides/pspdfkit-2-1-migration-guide.md)
- [Migrate to electronic signatures](/guides/android/migration-guides/migrating-to-electronic-signatures.md)
- [Nutrient 10 Migration Guide](/guides/android/migration-guides/nutrient-10-migration-guide.md)
- [Pspdfkit 2024 2 Migration Guide](/guides/android/migration-guides/pspdfkit-2024-2-migration-guide.md)
- [Pspdfkit 2024 1 Migration Guide](/guides/android/migration-guides/pspdfkit-2024-1-migration-guide.md)
- [Pspdfkit 2024 3 Migration Guide](/guides/android/migration-guides/pspdfkit-2024-3-migration-guide.md)
- [Pspdfkit 2024 4 Migration Guide](/guides/android/migration-guides/pspdfkit-2024-4-migration-guide.md)
- [Pspdfkit 2024 7 Migration Guide](/guides/android/migration-guides/pspdfkit-2024-7-migration-guide.md)
- [Pspdfkit 2024 6 Migration Guide](/guides/android/migration-guides/pspdfkit-2024-6-migration-guide.md)
- [Pspdfkit 4 4 Migration Guide](/guides/android/migration-guides/pspdfkit-4-4-migration-guide.md)
- [Pspdfkit 3 1 Migration Guide](/guides/android/migration-guides/pspdfkit-3-1-migration-guide.md)
- [Migrate to Nutrient 3.0 with ease](/guides/android/migration-guides/pspdfkit-3-migration-guide.md)
- [Pspdfkit 5 1 Migration Guide](/guides/android/migration-guides/pspdfkit-5-1-migration-guide.md)
- [Pspdfkit 5 2 Migration Guide](/guides/android/migration-guides/pspdfkit-5-2-migration-guide.md)
- [Pspdfkit 5 3 Migration Guide](/guides/android/migration-guides/pspdfkit-5-3-migration-guide.md)
- [Pspdfkit 6 1 Migration Guide](/guides/android/migration-guides/pspdfkit-6-1-migration-guide.md)
- [Pspdfkit 5 5 Migration Guide](/guides/android/migration-guides/pspdfkit-5-5-migration-guide.md)
- [Migration guide for Android SDK 4 features](/guides/android/migration-guides/pspdfkit-4-migration-guide.md)
- [Pspdfkit 6 3 Migration Guide](/guides/android/migration-guides/pspdfkit-6-3-migration-guide.md)
- [Pspdfkit 6 2 Migration Guide](/guides/android/migration-guides/pspdfkit-6-2-migration-guide.md)
- [Pspdfkit 7 Migration Guide](/guides/android/migration-guides/pspdfkit-7-migration-guide.md)
- [Pspdfkit 6 4 Migration Guide](/guides/android/migration-guides/pspdfkit-6-4-migration-guide.md)
- [Pspdfkit 5 Migration Guide](/guides/android/migration-guides/pspdfkit-5-migration-guide.md)
- [Pspdfkit 8 7 Migration Guide](/guides/android/migration-guides/pspdfkit-8-7-migration-guide.md)
- [Pspdfkit 6 Migration Guide](/guides/android/migration-guides/pspdfkit-6-migration-guide.md)
- [Pspdfkit 6 6 Migration Guide](/guides/android/migration-guides/pspdfkit-6-6-migration-guide.md)
- [Pspdfkit 8 6 Migration Guide](/guides/android/migration-guides/pspdfkit-8-6-migration-guide.md)
- [Pspdfkit 8 9 Migration Guide](/guides/android/migration-guides/pspdfkit-8-9-migration-guide.md)
- [Pspdfkit 8 Migration Guide](/guides/android/migration-guides/pspdfkit-8-migration-guide.md)
- [Pspdfkit 8 8 Migration Guide](/guides/android/migration-guides/pspdfkit-8-8-migration-guide.md)
- [Upgrading](/guides/android/advanced-integration/upgrading.md)

