Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 18.104.22.168 release ready!
Owner and Founder. Opencart
App Shortcuts functionality is used to access the particular actions inside your application directly from the launcher icon, you can check the shortcuts by long pressing on your app icon. The user can also pin the shortcut to access the actions quickly.
Static shortcuts: These are defined in a resource file that is packaged into an APK or app bundle.
Dynamic shortcuts: These shortcuts are applied at runtime using the ShortcutManager API. You can add, update, and remove shortcuts when using the dynamic shortcuts.
Pinned shortcuts (Android 8.0 =API level 26): These are added with the help ShortcutManager API at runtime.
Note: Users can also create pinned shortcuts themselves by copying your app’s static and dynamic shortcuts onto the launcher.
you can add shortcuts up to five times, static and dynamic shortcuts combined at a time on your app.
There is no limit to the number of pinned shortcuts for your application. Even though your app cannot remove pinned shortcuts, it can still disable them.
Note: Although other apps can’t access the metadata within your shortcuts, the launcher itself can access this data. Therefore, these metadata should conceal sensitive user information.
Let’s start with the coding part. Let’s start with MainActivity.kt
Now adding the Handler class having the button click event methods:
1. Pinned Shortcuts only work in Android 8.0 and above.
2. Before the pinned shortcuts can be used you must have to create at least 1 or more static or dynamic shortcuts.
3. The pinned shortcuts can be added multiple times.
The layout code for the main activity.
For the static shortcuts, we have to create a shortcuts.xml file under the directory of res->xml(create resource directory if not created.)
String resources used for the application.
To instantiate the activity and meta-data of shortcuts on the manifest file.
Finally, the application shortcuts will be shown like this:
. . . . . . . . . .
Thank you for reading till now, you can also check our other blogs: Click here and you can also check the official blog for app shortcuts: Click here
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
The support is fast and do everything in their power to make it perfect. If you need customization it's also done right away. I had massive research to select Mobikul and now I'm sure it was the right one.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.