A partire dal 27 marzo 2025, ti consigliamo di utilizzare android-latest-release anziché aosp-main per compilare e contribuire ad AOSP. Per ulteriori informazioni, vedi Modifiche ad AOSP.
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
A partire da Android 14, le API Capture Content for Notes consentono agli utenti di acquisire uno screenshot direttamente tramite l'app di scrittura di appunti predefinita. Con queste API, gli utenti possono usufruire di un'esperienza di scrittura di appunti multitasking ritagliando i contenuti preferiti sullo schermo e incollandoli in una nota.
Le API Capture Content for Notes sono progettate specificamente per le app che detengono il ruolo NOTES. Android
14 utilizza l'autorizzazione
LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE per garantire che solo le app con ruolo NOTES possano utilizzare le API Capture
Content per Notes. Le app devono verificare di disporre dell'autorizzazione prima di chiamare le API. Gli OEM possono consentire agli utenti di impostare l'app per scrivere note predefinita attivando il ruolo NOTES.
Per ulteriori informazioni sulle API Capture Content for Notes:
Personalizzazione OEM per Acquisisci contenuti per Note
Il ruolo NOTES consente agli utenti di selezionare un'app per prendere appunti idonea come app per prendere appunti predefinita. Un OEM può controllare la disponibilità del ruolo NOTES su un dispositivo impostando config_enableDefaultNotes. Il valore di config_enableDefaultNotes è impostato su false per impostazione predefinita.
Se il ruolo NOTES è abilitato, l'OEM deve supportare le API Capture Content for Notes fornendo le personalizzazioni e le integrazioni di note di sistema necessarie. Gli OEM possono scegliere di personalizzare l'implementazione AOSP predefinita o fornire la propria implementazione sostituendo config_screenshotAppClipsServiceComponent o config_screenshotAppClipsActivityComponent.
Fai riferimento al pacchetto notetask per un'implementazione predefinita dell'integrazione di sistema per la creazione di note.
Per implementare le API Capture Content per Note, sono necessarie modifiche all'interfaccia utente di sistema. Gli OEM possono personalizzare l'interfaccia utente per attivare e modificare uno screenshot e fornire l'implementazione nell'interfaccia utente di sistema di Android. Come esempio di integrazione personalizzata dell'OEM, l'interfaccia utente di sistema può avviare un'app per il titolare del ruolo NOTES nella schermata di blocco utilizzando una scorciatoia della schermata di blocco, ad esempio un pulsante o un'icona sulla schermata di blocco o un gesto basato su stilo. Analogamente, nella schermata Home, l'interfaccia utente di sistema può avviare l'app del proprietario del ruolo NOTES in una modalità finestra multitasking, ad esempio una finestra a bolle o una finestra mobile, tramite un gesto basato su stilo.
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-27 UTC."],[],[],null,["# Capture Content for Notes\n\nStarting with Android 14, the Capture Content for Notes\nAPIs let users capture a screenshot directly through the default\nnote-taking app. With these APIs, users can have a multitasking note-taking\nexperience by clipping preferred content on their\nscreen and pasting it into a note.\n\nThe Capture Content for Notes APIs are designed specifically for apps holding the\n[`NOTES`](/docs/core/permissions/android-roles) role. Android\n14 uses the\n[`LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/core/res/AndroidManifest.xml#2571) permission to ensure that only\n`NOTES` role holder apps can use the Capture\nContent for Notes APIs. Apps must check if they have the permission before\ncalling the APIs. OEMs can let users set their default note-taking app by\nenabling the [`NOTES`](/docs/core/permissions/android-roles)\nrole.\n\nSee the following for more information about the Capture Content for Notes\nAPIs:\n\n- [`Intent#ACTION_LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE`](https://developer.android.com/reference/android/content/Intent#ACTION_LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE)\n\n- [`Intent#EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE`](https://developer.android.com/reference/android/content/Intent#EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE)\n\n- [`android.permission.LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE`](https://developer.android.com/reference/android/Manifest.permission#LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE)\n\n- [`StatusBarManager#canLaunchCaptureContentActivityForNote`](https://developer.android.com/reference/android/app/StatusBarManager#canLaunchCaptureContentActivityForNote(android.app.Activity))\n\nOEM customization for Capture Content for Notes\n-----------------------------------------------\n\nThe `NOTES` role lets users select an\neligible note taking app to be the default notes app. An OEM can control the\navailability of the `NOTES` role on a device by setting\n[`config_enableDefaultNotes`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/core/res/res/values/config.xml#2243). The value of `config_enableDefaultNotes` is\nset to `false` by default.\n\nIf the `NOTES` role is enabled, the OEM must support the Capture Content for\nNotes APIs by providing the necessary customizations and system note-taking\nintegrations. OEMs can choose to customize the [default AOSP\nimplementation](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/packages/SystemUI/src/com/android/systemui/screenshot/appclips), or provide their\nimplementation by overriding\n[`config_screenshotAppClipsServiceComponent`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/core/res/res/values/config.xml#3356) or [`config_screenshotAppClipsActivityComponent`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/packages/SystemUI/res/values/config.xml#466).\nRefer to the [`notetask`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/packages/SystemUI/src/com/android/systemui/notetask)\npackage for a default system note-taking integration implementation.\n\nChanges are required in System UI for implementing the Capture Content for\nNotes APIs. OEMs can customize the UI to trigger and edit a screenshot and\nprovide the implementation in the Android System UI. As an example of OEM\ncustomized integration, the System UI can launch a `NOTES` role holder app on\nthe lock screen using a lock screen shortcut, such as a button or icon on the\nlock screen or a stylus-based gesture. Similarly, on the home screen the\nSystem UI can launch the `NOTES` role holder app in a multitasking window\nmode, such as a bubble window or floating window, by a stylus-based gesture.\n| **Note:** An OEM can restrict the availability of the Capture Content for Notes APIs based on windowing mode. As an example, the API can return a status code of `CAPTURE_CONTENT_FOR_NOTE_WINDOW_MODE_UNSUPPORTED` if the default note-taking app isn't running in a floating window. Apps must check if the screenshot functionality is available by calling [`StatusBarManager#canLaunchCaptureContentActivityForNote`](https://developer.android.com/reference/android/app/StatusBarManager#canLaunchCaptureContentActivityForNote(android.app.Activity)).\n\nValidation of Capture Content for Notes\n---------------------------------------\n\nFor CTS-Verifier testing, see\n[Capture Content for Notes test](/docs/compatibility/cts/cts-verifier#content-capture-test).\n| **Note:** Based on the implementation, to test the API, OEMs might require hardware such as a stylus to trigger the system note-taking integration."]]