Usage
App shortcuts feature allows to add quick shortcut actions to the app icon
All App Shortcuts features can be accessible from AppShortcuts static class.
Before using any of the plugin's features, you need to import the namespace.
Add Shortcut
To add a shortcut, create an unique id to identify the shortcut. Along with it, it's possible to pass few more configuration options like
Identifier (Required) - Unique identifier to identify this shortcut item
Title (Required) - Title displayed for the shortcut item
SubTitle - Subtitle to be displayed for the shortcut (May not be supported on all platforms)
IconFileName - File name with extension which will be shown in the shortcut item
To pass these properties, you can create an AppShortcutItem with AppShortcutItem.Builder.
Once you create an App Shortcut Item instance, you can pass it to Add method as below.
Remove Shortcut
Once after you added a shortcut, you can remove it anytime with Remove method by passing a shortcut identifier.
Events
If any shortcut is clicked by the user, we fire an event AppShortcuts.OnShortcutClicked which has the identifier of the shortcut clicked.
Once a user clicks on app icon shortcut, it opens the app. It may not be possible to register the events at very start of your game.
So, we do cache the event internally and only fire it once you register to AppShortcuts.OnShortcutClicked event. Cool right? 👏👏👏
Last updated
Was this helpful?