Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Java for Android
  • Android Studio
  • Android Kotlin
  • Kotlin
  • Flutter
  • Dart
  • Android Project
  • Android Interview
Open In App
Next Article:
How to Add Capabilities to Shortcuts in Android 13?
Next article icon

How to Add Capabilities to Shortcuts in Android 13?

Last Updated : 28 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Shortcuts have been an integral part of Android Apps, almost every app we use has shortcuts that facilitate main activity opening with various time-savers, which turn out to be great time savers. Over the years this experience has greatly improved, and now we can add even more capabilities to our app. In this Geeks for Geeks article we will be discussing how to implement more capabilities in our Android apps which will help you get more users and help them to complete their work by saving more time. Without further ado, let's get straight into the topic and learn how to add capabilities to your app, and bake a better UX. 

How does the key-fastener API work?

You can specify the kinds of actions users can take to open your app and proceed immediately to carry out a certain job using capabilities in shortcuts.xml. For instance, Google Assistant App Actions employ capabilities to give developers the ability to convert built-in intents (BII) from in-app features to built-in actions (GAAA), enabling users to activate and manage those features using spoken commands. A capability is made up of the name of the action and intent that is targeted at the location in your app where the user's intent is resolved. Look at the image below to understand how capabilities are the third layer in the application's outer interface layer:

Understanding the layers in the App architecture
Image #1: Understanding the layers in the App architecture

Steps to Add Capabilities to Your App's Shortcut (ft. Android 13)

If the targetSDK of your app is more than Android 13, or perhaps Android 12, then you can use the methods below to attach more capabilities to your app's shortcut.

GeekTip: The shortcuts mentioned here are added in the XML file, which we have already learned in another article about adding shortcuts in Android apps.

To add key dynamics to your currently existing shortcut, do the following:

Step #1: In your Android app development project, shortcuts.xml is a resource file where capability items are defined. 

Step #2: Use the steps in Create static shortcuts to create a shortcuts.xml resource, which is mentioned in the above link.

Step #3: Include the necessary information listed below in your capacity next:

  • Name of the capability: The operation your application should support. For information on the feature that needs capability definitions, consult the component documentation. 
    You have to determine a clear name for your capability name, because if you have a dynamic shortcut then it will land in errors, and will conflict with the app installation, or will create confusion at later stages of development. 
  • App destination: The place in your app to which an action is launched in response to a user request. Use intent components nested within the capability to define app destinations.

Step #4: Organising the dynamic intents (Only to be used if the shortcut is dynamic), map the full shortcuts XML in such a way that the names are unique, otherwise it will get difficult to work on your app at later stages of development. Here is an example of an app, that shows how the courses and articles are maintained, you can also use it for reference:

XML
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">   <capability android:name="actions.intent.COURSE_INTRO">     <intent       android:action="android.intent.action.SHOW"       android:targetPackage="com.SpandanSaxena.gfgShortcuts"       android:targetClass="com.SpandanSaxena.gfgShortcuts.CourseActivity">     </intent>   </capability> </shortcuts> 

That's it, by doing this you have successfully added a shortcut to the app, and you can successfully build your app and then publish it.

Few points to remember:

  • The destination activity is indicated by the variable android:targetClass: com.SpandanSaxena.gfgShortcuts.CourseActivity.
  • For this intent, the target application package is set through the android:targetPackage attribute.

Conclusive steps after capability addition

Once a capability has been defined, you can increase its functionality by connecting static or dynamic shortcuts to it. The feature being used and the precise terms in a user's request determine how shortcuts are connected to a capability. Consider a situation where the user says to the device to enroll him/ her in a course from Geeks for Geeks, then you can provide an extension that will then be launched in the form of an intent, which you have created in your shortcut. Directly launching would save a lot of time, and also would save the app warmup time.


Next Article
How to Add Capabilities to Shortcuts in Android 13?

T

therebootedcoder
Improve
Article Tags :
  • Technical Scripter
  • Android
  • Technical Scripter 2022
  • Android 13

Similar Reads

    How to Create Static Shortcuts in Android App?
    An application might contain several services for the user and to facilitate a user quickly to those services, shortcuts are used. Shortcuts for an application are a list of features (quick services) that helps the users to easily and quickly jump to particular features or activities within the appl
    7 min read
    How to Create Your Own Shortcut in Android Studio?
    Android Studio is the official integrated development environment for Google’s Android operating system, built on JetBrains’ IntelliJ IDEA software and designed specifically for Android app development. Android Studio offers a lot of shortcuts to users. It also provides to configure Keymap and add y
    2 min read
    How to Create Dynamic Shortcuts of an Android Applications?
    In Android Phones, when an Application is held for more than a second, certain app actions appear in a list. These app actions are nothing but shortcuts for performing and actions without opening the application. Shortcuts for an application are a list of features (quick services) that helps the use
    5 min read
    How to Add Share Button in Toolbar in Android?
    In this article, we are going to create a simple Share Button in the Toolbar in Android. The Share Button is used to share information on mail, Bluetooth, Facebook, Twitter, WhatsApp, etc to an individual person or a group on any social media. We can share any type of message like text, images, vide
    4 min read
    How to Use Game Mode API in Android 13?
    It has been a really long time since Android has a dedicated game mode of its own, but it appears that Google has finally listened to all the gamers out there. When the user chooses the appropriate game mode, the Game Mode API enables you to optimize your game for the greatest performance or the lon
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences