تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
بصفتك مطورًا، يمكنك تحديد الاختصارات لتنفيذ إجراءات محدّدة
في تطبيقك. ويمكنك عرض هذه الاختصارات في مشغّل تطبيقات أو
مساعد متوافق مثل "مساعد Google"، ومساعدة المستخدمين في بدء
المهام الشائعة أو المقترَحة داخل التطبيق بسرعة.
الشكل 1. وباستخدام اختصارات التطبيقات، يمكنك عرض
الإجراءات الرئيسية وتوجيه المستخدمين على الفور إلى صفحة أعمق في تطبيقك.
يشير كل اختصار إلى هدف واحد أو أكثر، ويطلق كل اختصار منها إجراءً معيّنًا في تطبيقك عندما يختار المستخدمون الاختصار. تعتمد أنواع الاختصارات التي تنشئها لتطبيقك على حالة استخدام التطبيق.
في ما يلي أمثلة على الإجراءات التي يمكنك التعبير عنها كاختصارات:
إنشاء رسالة بريد إلكتروني جديدة في تطبيق بريد إلكتروني.
نقل المستخدمين إلى موقع جغرافي معيّن في تطبيق خرائط
إرسال رسائل إلى جهة اتصال مستخدم في أحد تطبيقات التواصل
تشغيل الحلقة التالية من برنامج تلفزيوني في تطبيق وسائط
تحميل آخر نقطة حفظ في لعبة على الأجهزة الجوّالة
السماح للمستخدم بطلب مشروب من تطبيق توصيل باستخدام الطلبات
المنطوقة
يمكنك نشر الأنواع التالية من الاختصارات لتطبيقك:
يتم تحديد الاختصارات الثابتة في ملف موارد يتم تجميعه في
حزمة APK أو حزمة تطبيق.
لا يمكن لتطبيقك دفع الاختصارات الديناميكية أو تعديلها أو إزالتها إلا في وقت التشغيل.
يمكن إضافة الاختصارات المثبَّتة إلى مشغّلات التطبيقات المتوافقة في وقت التشغيل في حال
منح المستخدم الإذن.
عرض الاختصارات في "مساعد Google" باستخدام الإمكانات
تتيح لك الإمكانات في shortcuts.xml توضيح أنواع الإجراءات
التي يمكن للمستخدمين اتخاذها لتشغيل تطبيقك والانتقال مباشرةً إلى
تنفيذ مهمة محدّدة. على سبيل المثال، يمكنك منح المستخدمين إمكانية التحكّم الصوتي في تطبيقك من خلال
"مساعد Google" من خلال تعريف عناصر capability التي توسّع
وظائفك داخل التطبيق لتشمل
مهام
التطبيقات المزوّدة بخدمة "مساعد Google". للحصول على مزيد من التفاصيل، يمكنك الاطّلاع على المستندات
المتعلقة بإضافة الإمكانيات.
القيود المفروضة على الاختصارات
تعرض معظم مشغّلات التطبيقات المتوافقة ما يصل إلى أربعة اختصارات في الوقت نفسه، بما في ذلك الاختصارات الثابتة والديناميكية. عند عرض الاختصارات الديناميكية لعرضها على مساحات عرض Google، مثل "مساعد Google"، يمكنك استخدام مكتبة دمج اختصارات Google حتى لا يتم تجاوز الحد المسموح به للاختصارات.
إذا اخترت عدم استخدام "مكتبة دمج اختصارات Google"، سيخضع تطبيقك للحدّ الأقصى المسموح به لعدد الاختصارات المُستخدَم في الجهاز في كل مرة. لا تظهر الاختصارات التي يتم نشرها بهذه الطريقة إلا في مشغّلات تطبيقات Android ولا يمكن اكتشافها على مساحات عرض Google، مثل "مساعد Google".
ما مِن حدّ أقصى لعدد الاختصارات المثبَّتة التي يمكن للمستخدمين إنشاؤها في تطبيقك، لكن لا يمكن لتطبيقك إزالة الاختصارات المثبَّتة، ولكن يمكنه إيقافها.
لبدء إنشاء اختصارات لتطبيقك، راجع
الوثائق التالية:
للمزيد من التفاصيل حول العمليات التي يمكنك تنفيذها باستخدام الاختصارات، يُرجى الاطّلاع على
ShortcutManager
المستندات المرجعية لواجهة برمجة التطبيقات.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-26 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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."]]