바로가기 권장사항
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
앱의 바로가기를 디자인하고 만들 때는 다음 가이드라인을 따르세요.
-
디자인 가이드라인 준수
-
앱 바로가기를 시스템 앱에 사용되는 바로가기와 시각적으로 일관되도록 하려면 앱 바로가기 아이콘 디자인 가이드라인을 따르세요.
-
개별 바로가기를 4개만 게시
-
API는 앱에 최대 15개의 정적 바로가기와 동적 바로가기의 조합을 지원하지만 런처에서 시각적 모양을 개선하기 위해 고유한 바로가기를 4개만 게시하는 것이 좋습니다.
런처에 바로가기를 표시하는 것 외에도 Google 바로가기 통합 라이브러리를 사용하여 Google 어시스턴트와 같은 Google 표시 경로에 바로가기를 표시할 수 있습니다. 이 라이브러리는 무제한의 동적 바로가기 푸시를 지원합니다. 이 라이브러리를 사용하여 많은 수의 바로가기를 푸시하는 경우 setRank()
메서드를 호출하여 지원되는 런처에 표시되어야 하는 바로가기의 rank
를 설정하는 것이 좋습니다.
-
바로가기 설명 길이 제한
-
런처에서 앱의 바로가기를 표시하는 메뉴의 공간이 제한됩니다. 가능하면 바로가기의 '짧은 설명' 길이를 10자로, '긴 설명' 길이를 25자로 제한합니다.
정적 바로가기의 라벨에 관한 자세한 내용은 속성 값 맞춤설정을 참고하세요.
동적 및 고정된 바로가기에 관한 내용은 setLongLabel()
및 setShortLabel()
에 관한 참조 문서를 확인하세요.
-
바로가기 및 작업 사용 내역 유지
-
바로가기를 만들 때 사용자가 앱 내에서 직접 동일한 작업을 실행할 수 있는 다양한 방법을 고려하세요. 이러한 각 상황에서 reportShortcutUsed()
를 호출하여 런처가 사용자가 바로가기를 나타내는 작업을 실행하는 빈도에 관한 정확한 기록을 유지하도록 합니다.
-
의미가 유지될 때만 바로가기 업데이트
-
동적 및 고정된 바로가기를 변경할 때는 그 의미를 유지하는 바로가기의 정보를 변경할 때만 updateShortcuts()
를 호출합니다. 또는 다시 만드는 바로가기 유형에 따라 다음 방법 중 하나를 사용합니다.
예를 들어 슈퍼마켓으로 가는 바로가기를 만드는 경우 슈퍼마켓 이름은 변경되었지만 위치가 동일하게 유지된다면 바로가기를 업데이트하는 것이 좋습니다. 그러나 사용자가 다른 슈퍼마켓 위치에서 쇼핑을 시작하면 새 바로가기를 만드는 것이 좋습니다.
-
앱을 실행할 때마다 동적 바로가기 확인
-
동적 바로가기는 사용자가 새로운 기기에 데이터를 복원할 때 유지되지 않습니다. 따라서 백업 및 복원의 코드 스니펫과 같이 앱을 실행할 때마다 getDynamicShortcuts()
에서 반환한 객체 수를 확인하고 필요에 따라 동적 바로가기를 다시 게시하는 것이 좋습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Best practices for shortcuts\n\nWhen designing and creating your app's shortcuts, follow these guidelines:\n\n\n**Follow the design guidelines**\n\n: To make your app's shortcuts visually consistent with the shortcuts used for system apps, follow\n the\n [App Shortcuts Icon Design Guidelines](/static/shareables/design/app-shortcuts-design-guidelines.pdf).\n\n\n**Publish only four distinct shortcuts**\n\n: Although the API supports a combination of up to 15 static and dynamic shortcuts for your app, we\n recommend that you publish only four distinct shortcuts, to improve their visual appearance in the\n launcher.\n\n In addition to displaying shortcuts on the launcher, use the\n [Google Shortcuts Integration Library](/develop/ui/views/launch/shortcuts/creating-shortcuts#gsi-library)\n to display shortcuts on Google surfaces such as Google Assistant. This library supports pushing an\n unlimited number of dynamic shortcuts. If you are using this library to push a large number of\n shortcuts, we recommend setting the `rank` of the shortcuts that must appear in supported\n launchers by calling the\n [](/reference/androidx/core/content/pm/ShortcutInfoCompat.Builder#setRank(int))`setRank()`\n method.\n\n\n**Limit shortcut description length**\n\n: The space in the menu that shows your app's shortcuts in the launcher is limited. When possible,\n limit the length of the \"short description\" of a shortcut to 10 characters and limit the length of\n the \"long description\" to 25 characters.\n\n For more information about labels for static shortcuts, read\n [Customize attribute values](/guide/topics/ui/shortcuts/creating-shortcuts#attribute-values).\n For dynamic and pinned shortcuts, read the reference documentation on\n [setLongLabel()](/reference/androidx/core/content/pm/ShortcutInfoCompat.Builder#setLongLabel(java.lang.CharSequence))\n and\n [setShortLabel()](/reference/androidx/core/content/pm/ShortcutInfoCompat.Builder#setShortLabel(java.lang.CharSequence)).\n\n\n**Maintain shortcut and action usage history**\n\n: For each shortcut you create, consider the different ways a user can accomplish the same task\n directly within your app. Call\n [reportShortcutUsed()](/reference/androidx/core/content/pm/ShortcutManagerCompat#reportShortcutUsed(android.content.Context,%20java.lang.String))\n in each of these situations so that the launcher maintains an accurate history of how frequently a\n user performs the actions representing your shortcuts.\n\n\n**Update shortcuts only when their meaning is retained**\n\n: When changing dynamic and pinned shortcuts, only call\n [updateShortcuts()](/reference/androidx/core/content/pm/ShortcutManagerCompat#updateShortcuts(android.content.Context,%20java.util.List%3Candroidx.core.content.pm.ShortcutInfoCompat%3E))\n when changing the information of a shortcut that retains its meaning. Otherwise, use one of the\n following methods, depending on the type of shortcut you're recreating:\n\n - Dynamic shortcuts: [pushDynamicShortcut()](/reference/androidx/core/content/pm/ShortcutManagerCompat#pushDynamicShortcut(android.content.Context,%20androidx.core.content.pm.ShortcutInfoCompat)).\n - Pinned shortcuts: [requestPinShortcut()](/reference/androidx/core/content/pm/ShortcutManagerCompat#requestPinShortcut(android.content.Context,%20androidx.core.content.pm.ShortcutInfoCompat,%20android.content.IntentSender)).\n\n For example, if you create a shortcut for navigating to a supermarket, it is appropriate to\n update the shortcut if the name of the supermarket changes but its location stays the same. If the\n user begins shopping at a different supermarket location, however, it's better to create a new\n shortcut.\n\n\n**Check dynamic shortcuts whenever you launch your app**\n\n: Dynamic shortcuts aren't preserved when the user restores their data onto a new device. For this\n reason, we recommend that you check the number of objects returned by\n [getDynamicShortcuts()](/reference/androidx/core/content/pm/ShortcutManagerCompat#getDynamicShortcuts(android.content.Context))\n each time you launch your app and re-publish dynamic shortcuts as needed, as shown in the code\n snippet in\n [Backup and restore](/guide/topics/ui/shortcuts/managing-shortcuts#backup-restore)."]]