Android 14부터 Capture Content for Notes API를 사용해 사용자가 기본 메모 작성 앱을 통해 바로 스크린샷을 캡처하도록 허용할 수 있습니다. 사용자는 이러한 API를 사용해 화면에서 좋아하는 콘텐츠를 잘라낸 후 메모에 붙여넣는 등 멀티태스킹이 가능한 메모 작성 환경을 사용할 수 있습니다.
Capture Content for Notes API는 NOTES 역할을 갖는 앱을 위해 특별히 마련되었습니다. Android 14는 NOTES 역할 보유자 앱만 Capture Content for Notes API를 사용할 수 있도록 LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE 권한을 사용합니다. 앱에서는 API를 호출하기 전에 반드시 해당 권한을 갖고 있는지 확인해야 합니다. OEM에서는 NOTES 역할을 사용 설정하여 사용자가 기본 메모 작성 앱을 설정하도록 허용할 수 있습니다.
NOTES 역할을 사용하면 사용자가 특정 메모 작성 앱을 기본 메모 앱으로 선택할 수 있습니다. OEM에서는 config_enableDefaultNotes를 설정하여 기기에서 NOTES 역할 사용 가능 여부를 제어할 수 있습니다. config_enableDefaultNotes의 값은 기본적으로 false로 설정되어 있습니다.
Capture Content for Notes API를 구현하려면 시스템 UI를 변경해야 합니다. OEM에서는 UI를 맞춤설정하여 스크린샷을 트리거 및 수정하고 Android 시스템 UI에서 구현을 제공할 수 있습니다. OEM 맞춤 통합의 일례로, 시스템 UI에서 잠금 화면 바로가기를 사용해 잠금 화면에서 NOTES 역할 보유자 앱을 실행할 수 있습니다. 이러한 잠금 화면 바로가기에는 잠금 화면에 표시되는 버튼이나 아이콘, 또는 스타일러스 기반 동작이 있을 수 있습니다. 이와 유사하게 시스템 UI 홈 화면에서도 멀티태스킹 창 모드에서 스타일러스 기반 동작을 통해 NOTES 역할 보유자 앱을 말풍선 창이나 플로팅 창으로 실행할 수 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2024-04-26(UTC)
[null,null,["최종 업데이트: 2024-04-26(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."]]