---
title: "Android PDF annotation events and notifications | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/android/events-and-notifications/annotation/"
md_url: "https://www.nutrient.io/guides/android/events-and-notifications/annotation.md"
last_updated: "2026-05-15T19:10:04.904Z"
description: "In Nutrient Android SDK, annotation events are accessible through the PdfFragment."
---

# Annotation events and notifications

In Nutrient Android SDK, annotation events are accessible through the [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html). There, you can find the following listeners for subscription:

| Listener                                 | Description                                                     |
| ---------------------------------------- | --------------------------------------------------------------- |
| `OnAnnotatingModeChangeListener`         | Listener for annotation mode (creation and editing) enter/exit. |
| `OnAnnotatingModeSettingsChangeListener` | Listener for annotation mode settings changes.                  |
| `OnAnnotationSelectedListener`           | Listener for annotation selection/deselection.                  |

Most use cases should be covered by these listeners, and they can be used as such:

```kt

override fun onCreate(savedInstanceState : Bundle?) {
    super.onCreate(savedInstanceState)

    pdfFragment.addOnAnnotationSelectedListener(object :OnAnnotationSelectedListener {
        override fun onPrepareAnnotationSelection(controller: AnnotationSelectionController, annotation: Annotation, annotationCreated: Boolean): Boolean {
            // Returning `false` here would prevent the annotation from being selected.
            return true
        }

        override fun onAnnotationSelected(annotation: Annotation, annotationCreated: Boolean) {
            Log.i(TAG, "The annotation was selected.")
        }

        override fun onAnnotationDeselected(annotation: Annotation, reselected: Boolean) {
            Log.i(TAG, "The annotation was deselected.")
        }
    })

    pdfFragment.addOnAnnotationUpdatedListener(object: OnAnnotationUpdatedListener {
        override fun onAnnotationCreated(annotation: Annotation) {
            Log.i(TAG, "The annotation was created.")
        }

        override fun onAnnotationUpdated(annotation: Annotation) {
            Log.i(TAG, "The annotation was updated.")
        }

        override fun onAnnotationRemoved(annotation: Annotation) {
            Log.i(TAG, "The annotation was removed.")
        }
    })
}

```

For more information on editing annotations and reacting to changes, please see our [how to detect annotation changes](https://www.nutrient.io/guides/android/annotations/create-edit-and-remove/detect-changes.md) guide.
---

## Related pages

- [Events and notifications](/guides/android/events-and-notifications.md)
- [Analytics](/guides/android/features/analytics.md)
- [Understand PDF form events in Android SDK](/guides/android/events-and-notifications/forms.md)
- [Analytics events](/guides/android/events-and-notifications/events.md)
- [Text selection events and notifications](/guides/android/events-and-notifications/text-selection.md)
- [PDF viewer events](/guides/android/miscellaneous/document-listeners.md)

