Launcher ที่รองรับส่วนใหญ่จะแสดงทางลัดได้สูงสุด 4 รายการในครั้งเดียว ซึ่งรวมถึง
ทั้งทางลัดแบบคงที่และแบบไดนามิก เมื่อพุชทางลัดแบบไดนามิกเพื่อแสดงบนแพลตฟอร์มของ Google เช่น Google Assistant ให้ใช้ไลบรารีการผสานรวมทางลัดของ Google เพื่อหลีกเลี่ยงการถูกจำกัดจำนวนทางลัด
หากเลือกไม่ใช้ไลบรารีการผสานรวมทางลัดของ Google แอปของคุณจะขึ้นอยู่กับขีดจำกัดของอุปกรณ์สำหรับจำนวนทางลัดที่รองรับในแต่ละครั้ง โดยทางลัดที่เผยแพร่ด้วยวิธีนี้จะปรากฏเฉพาะในตัวเรียกใช้ Android และ
จะไม่ปรากฏในแพลตฟอร์มของ Google เช่น Assistant
[[["เข้าใจง่าย","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,["# App shortcuts overview\n\nAs a developer, you can define *shortcuts* to perform specific actions\nin your app. You can display these shortcuts in a supported launcher or\nassistant---like Google Assistant---and help your users quickly start\ncommon or recommended tasks within your app.\n\nThis documentation shows you how to\n[create](/guide/topics/ui/shortcuts/creating-shortcuts) and\n[manage](/guide/topics/ui/shortcuts/managing-shortcuts) app\nshortcuts. You can also learn some\n[best practices](/guide/topics/ui/shortcuts/best-practices) to\nimprove your shortcuts.\n\nShortcut types\n--------------\n\n**Figure 1.** Using app shortcuts, you can surface key actions and instantly take users deep into your app.\n\nEach shortcut references one or more\n[intents](/guide/components/intents-filters), each of which\nlaunches a specific action in your app when users select the shortcut. The\ntypes of shortcuts you create for your app depend on the app's use case.\nExamples of actions you can express as shortcuts include the following:\n\n- Composing a new email in an email app.\n- Navigating users to a particular location in a mapping app.\n- Sending messages to a user's contact in a communication app.\n- Playing the next episode of a TV show in a media app.\n- Loading the last save point in a gaming app.\n- Letting the user order a drink in a delivery app using spoken commands.\n\n| **Note:** Only main activities---activities that handle the [Intent.ACTION_MAIN](/reference/android/content/Intent#ACTION_MAIN) action and the [Intent.CATEGORY_LAUNCHER](/reference/android/content/Intent#CATEGORY_LAUNCHER) category---can have shortcuts. If an app has multiple main activities, define the set of shortcuts for each activity.\n\nYou can publish the following types of shortcuts for your app:\n\n- *Static shortcuts* are defined in a resource file that is packaged into an APK or [app bundle](/guide/app-bundle/build).\n- *Dynamic shortcuts* can be pushed, updated, and removed by your app only at runtime.\n- *Pinned shortcuts* can be added to supported launchers at runtime if the user grants permission. **Note:** Users can also create pinned shortcuts by copying your app's static and dynamic shortcuts onto the launcher.\n\nDisplay shortcuts in assistants using capabilities\n--------------------------------------------------\n\n*Capabilities* in `shortcuts.xml` let you declare the types\nof actions users can take to launch your app and jump directly to performing a\nspecific task. For example, you can give users voice control of your app through\nGoogle Assistant by declaring `capability` elements that extend your\nin-app functionality to Assistant\n[App\nActions](https://developer.android.com/guide/app-actions/overview#app_actions). For more details, see the documentation about\n[adding\ncapabilities](/guide/topics/ui/shortcuts/adding-capabilities).\n\nShortcut limitations\n--------------------\n\nMost supported launchers display up to four shortcuts at a time, including\nboth static and dynamic shortcuts. When pushing dynamic shortcuts for display on\nGoogle's surfaces, such as Google Assistant, use the\n[Google\nShortcuts Integration Library](/guide/topics/ui/shortcuts/creating-shortcuts#gsi-library) to avoid being subject to the shortcut\nlimit.\n\nIf you choose not to use the Google Shortcuts Integration Library, your app\nis subject to the device's limit for the number of shortcuts it supports at a\ntime. Shortcuts published this way only appear within the Android launchers and\naren't discoverable on Google surfaces such as Assistant.\n| **Note:** The maximum number of shortcuts a device supports varies. Use the [`getMaxShortcutCountPerActivity()`](//developer.android.com/reference/androidx/core/content/pm/ShortcutManagerCompat#getMaxShortcutCountPerActivity(android.content.Context)) method to determine how many shortcuts a particular device supports.\n\nThere is no limit to the number of pinned shortcuts users can create to your\napp. Your app can't remove pinned shortcuts, but it can\n[disable](/guide/topics/ui/shortcuts/managing-shortcuts#disable-shortcuts)\nthem.\n| **Note:** Although other apps can't access the metadata within your shortcuts, the launcher itself can access this data. Therefore, conceal sensitive user information in this metadata.\n\nTo start creating shortcuts for your app, refer to the following\ndocumentation:\n\n- [Create shortcuts](/guide/topics/ui/shortcuts/creating-shortcuts)\n- [Manage shortcuts](/guide/topics/ui/shortcuts/managing-shortcuts)\n- [Best practices for\n shortcuts](/guide/topics/ui/shortcuts/best-practices)\n\nFor more details about operations you can perform on shortcuts, see the\n[ShortcutManager](/reference/android/content/pm/ShortcutManager)\nAPI reference documentation."]]