Shortcuts deliver specific types of content to your users by helping them quickly access parts of your app. How you deliver content with shortcuts depends on your use case and whether the shortcut's context is app-driven or user-driven. Although a static shortcut's context doesn't change and a dynamic shortcut's context constantly changes, the context in both cases is driven by your app. In cases where a user chooses how they want your app to deliver content to them, such as with a pinned shortcut, the context is defined by the user. The following scenarios demonstrate a few use cases for each shortcut type Static shortcuts are best for apps that link to content using a consistent structure throughout the lifetime of a user's interaction with the app. Because most launchers can only display four shortcuts at once, static shortcuts are useful for common activities. For example, if the user wants to view their calendar or email in a specific way, using a static shortcut ensures that their experience in performing a routine task is consistent. Dynamic shortcuts are used for actions in apps that are context-sensitive. Context-sensitive shortcuts are tailored to the actions users perform in an app. For instance, if you build a game that allows the user to start from their current level on launch, you should update the shortcut frequently. Using a dynamic shortcut allows the shortcut to be updated each time the user clears a level. Pinned shortcuts are used for specific, user-driven actions. For example, a user might want to pin a specific website to the launcher. This is beneficial because it allows the user to perform a custom action, like navigating to the website in one step, more quickly than using a default instance of a browser. Create static shortcuts Static shortcuts provide links to generic actions within your app, and these actions should remain consistent over the lifetime of your app's current version. Good candidates for static shortcuts include viewing sent messages, setting an alarm, and displaying a user's exercise activity for the day. To create a static shortcut, complete the following sequence of steps In your app's manifest file find an activity whose intent filters are set to the action and the category. Add a element to this activity that references the resource file where the app's shortcuts are defined Create a new resource file res/xml/ In this new resource file, add a root element, which contains a list of elements. Each element contains information about a static shortcut, including its icon, its description labels, and the intents that it launches within the app Customize attribute values The following list includes descriptions for the different attributes within a static shortcut. You must provide a value for androidshortcutId and androidshortcutShortLabel. All other values are optional. androidshortcutId A string literal, which represents the shortcut when a ShortcutManager object performs operations on it. Note You cannot set this attribute's value to a resource string, such as string/foo. androidshortcutShortLabel A concise phrase that describes the shortcut's purpose. When possible, limit the length of the "short description" of a shortcut to 10 characters. For more information, see setShortLabel. Note This attribute's value must be a resource string, such as string/shortcut_short_label. androidshortcutLongLabel An extended phrase that describes the shortcut's purpose. If there's enough space, the launcher displays this value instead of androidshortcutShortLabel. When possible, limit the length of the "long description" of a shortcut to 25 characters. For more information, see setLongLabel. Note This attribute's value must be a resource string, such as string/shortcut_long_label. androidshortcutDisabledMessage The message that appears in a supported launcher when the user attempts to launch a disabled shortcut. The message should explain to the user why the shortcut is now disabled. This attribute's value has no effect if androidenabled is true. Note This attribute's value must be a resource string, such as string/shortcut_disabled_message. androidenabled Determines whether the user can interact with the shortcut from a supported launcher. The default value of androidenabled is true. If you set it to false, you should also set a androidshortcutDisabledMessage that explains why you've disabled the shortcut. If you don't think you need to provide such a message, it's easiest to remove the shortcut from the XML file entirely. androidicon The bitmap or adaptive icon that the launcher uses when displaying the shortcut to the user. This value can be either the path to an image or the resource file that contains the image. Use adaptive icons whenever possible to improve performance and consistency. Note Shortcut icons cannot include tints. Configure inner elements The XML file that lists an app's static shortcuts supports the following elements inside each element. You must include an intent inner element for each static shortcut that you define. intent The action that the system launches when the user selects the shortcut. This intent must provide a value for the androidaction attribute. Note This intent element cannot include string resources. You can provide multiple intents for a single shortcut. See Manage multiple intents and activities, Set an intent, and the TaskStackBuilder class reference for details. categories Provides a grouping for the types of actions that your app's shortcuts perform, such as creating new chat messages. For a list of supported shortcut categories, see the ShortcutInfo class reference. capability-binding Declares the capability linked with this shortcut. In this example, the shortcut is linked to a capability declared for CREATE_MESSAGE, which is an App Actions built-in intent. This particular capability binding enables users to use spoken commands with Google Assistant to invoke this shortcut. Create dynamic shortcuts Dynamic shortcuts provide links to specific, context-sensitive actions within your app. These actions can change between uses of your app, and they can change even while your app is running. Good examples of use cases for dynamic shortcuts include calling a specific person, navigating to a specific location, and loading a game from the user's last save point. You can also use dynamic shortcuts to open a conversation. The ShortcutManagerCompat Jetpack library is a helper for the ShortcutManager API, which lets you manage dynamic shortcuts in your app. Using ShortcutManagerCompat library reduces boilerplate code and ensures your shortcuts work consistently across Android versions. This library is also required for pushing dynamic shortcuts so that they are eligible to appear on Google surfaces, like Assistant, with the Google Shortcuts Integration Library. The ShorcutManagerCompat API allows your app to perform the following operations with dynamic shortcuts Push and update Use pushDynamicShortcut to publish and update your dynamic shortcuts. If there are already dynamic or pinned shortcuts with the same ID, each mutable shortcut is updated. Remove Remove a set of dynamic shortcuts using removeDynamicShortcuts, or remove all dynamic shortcuts using removeAllDynamicShortcuts. For more information about performing operations on shortcuts, read Manage shortcuts and the ShortcutManagerCompat reference. An example of creating a dynamic shortcut and associating it with your app appears in the following code snippet Kotlin val shortcut = "id1" .setShortLabel"Website" .setLongLabel"Open the website" .setIcon .setIntentIntent .build shortcut Java ShortcutInfo shortcut = new "id1" .setShortLabel"Website" .setLongLabel"Open the website" .setIcon .setIntentnew Intent .build; shortcut; Add the Google Shortcuts Integration Library The Google Shortcuts Integration Library is an optional Jetpack library. It lets you push dynamic shortcuts that can be displayed on both Android surfaces such as the launcher and Google surfaces such as Assistant. Using this library enables your users to easily discover your shortcuts to quickly access specific content or replay actions in your app. For example, a messaging app might push a dynamic shortcut for a contact "Alex" after a user messages that person. After that dynamic shortcut is pushed, if the user asks Assistant, "Hey Google, message Alex on ExampleApp," Assistant could launch ExampleApp and automatically configure it to send a message to Alex. Dynamic shortcuts pushed with this library are not subject to the shortcut limits enforced on a per-device basis, enabling your app to push a shortcut every time a user completes an associated action in your app. Pushing frequent shortcuts in this manner enables Google to understand your user's patterns of use and suggest contextually relevant shortcuts to them. For example, Assistant could learn from shortcuts pushed from your fitness-tracking app that a user typically goes for a run each morning and proactively suggest a "start a run" shortcut when the user picks up their phone in the morning. The Google Shortcuts Integration Library does not offer any addressable functionality itself. Adding this library to your app enables Google surfaces to ingest the shortcuts your app pushes using ShortcutManagerCompat. To use this library in your app, follow these steps Update your file to support AndroidX libraries Automatically convert third-party libraries to use AndroidX In app/ add dependencies for the Google Shortcuts Integration Library and ShortcutManagerCompat dependencies { implementation " implementation ' ... } With the library dependencies added to your Android project, your app can use the pushDynamicShortcut method of ShortcutManagerCompat to push dynamic shortcuts that will be eligible for display on the launcher and participating Google surfaces. Note We recommend using pushDynamicShortcut to push dynamic shortcuts using the Google Shortcuts Integration Library. Your app can use other methods to publish shortcuts, but those may fail if they reach the maximum shortcut limit. Create pinned shortcuts On Android API level 26 and higher, you can create pinned shortcuts. Unlike static and dynamic shortcuts, pinned shortcuts appear in supported launchers as separate icons. Figure 1 shows the distinction between these two types of shortcuts. Note When you attempt to pin a shortcut onto a supported launcher, the user receives a confirmation dialog asking their permission to pin the shortcut. If the user doesn't allow the shortcut to be pinned, the launcher cancels the request. Figure 1. Appearance of app shortcuts and pinned shortcuts To pin a shortcut to a supported launcher using your app, complete the following sequence of steps Use isRequestPinShortcutSupported to verify that the device's default launcher supports in-app pinning of shortcuts. Create a ShortcutInfo object in one of two ways, depending on whether the shortcut already exists If the shortcut already exists, create a ShortcutInfo object that contains only the existing shortcut's ID. The system finds and pins all other information related to the shortcut automatically. If you're pinning a new shortcut, create a ShortcutInfo object that contains an ID, an intent, and a short label for the new shortcut. Note Because the system performs backup and restore on pinned shortcuts automatically, these shortcuts' IDs should contain either stable, constant strings or server-side identifiers, rather than identifiers generated locally that might not make sense on other devices. Attempt to pin the shortcut to the device's launcher by calling requestPinShortcut. During this process, you can pass in a PendingIntent object, which notifies your app only when the shortcut is pinned successfully. Note If the user doesn't allow the shortcut to be pinned to the launcher, your app doesn't receive a callback. After a shortcut is pinned, your app can update its contents using the updateShortcuts method. For more information, read Update shortcuts. The following code snippet demonstrates how to create a pinned shortcut Note Instances of the ShortcutManager class must be obtained using with the argument or with the argument Kotlin val shortcutManager = getSystemServiceShortcutManager if shortcutManager!!.isRequestPinShortcutSupported { // Assumes there's already a shortcut with the ID "my-shortcut". // The shortcut must be enabled. val pinShortcutInfo = "my-shortcut".build // Create the PendingIntent object only if your app needs to be notified // that the user allowed the shortcut to be pinned. Note that, if the // pinning operation fails, your app isn't notified. We assume here that the // app has implemented a method called createShortcutResultIntent that // returns a broadcast intent. val pinnedShortcutCallbackIntent = // Configure the intent so that your app's broadcast receiver gets // the callback details, see val successCallback = /* request code */ 0, pinnedShortcutCallbackIntent, /* flags */ 0 } Java ShortcutManager shortcutManager = if { // Assumes there's already a shortcut with the ID "my-shortcut". // The shortcut must be enabled. ShortcutInfo pinShortcutInfo = new "my-shortcut".build; // Create the PendingIntent object only if your app needs to be notified // that the user allowed the shortcut to be pinned. Note that, if the // pinning operation fails, your app isn't notified. We assume here that the // app has implemented a method called createShortcutResultIntent that // returns a broadcast intent. Intent pinnedShortcutCallbackIntent = // Configure the intent so that your app's broadcast receiver gets // the callback details, see PendingIntent successCallback = /* request code */ 0, pinnedShortcutCallbackIntent, /* flags */ 0; } Note See also the support library APIs, isRequestPinShortcutSupported and requestPinShortcut, which work on Android API level 25 and lower. The support library falls back to the deprecated EXTRA_SHORTCUT_INTENT extra to attempt the pinning process. Create a custom shortcut activity Figure 2. Example of a custom app shortcut dialog activity You can also create a specialized activity that helps users create shortcuts, complete with custom options and a confirmation button. Figure 2 shows an example of this type of activity in the Gmail app. In your app's manifest file, add ACTION_CREATE_SHORTCUT to the activity's element. This declaration sets up the following behavior when the user attempts to create a shortcut The system starts your app's specialized activity. The user sets options for the shortcut. The user selects the confirmation button. Your app creates the shortcut using the createShortcutResultIntent method. This method returns an Intent, which your app relays back to the previously-executing activity using setResult. Your app calls finish on the activity used to create the customized shortcut. Similarly, your app can prompt users to add pinned shortcuts to the home screen after installation or the first time the app is launched. This method is effective because it helps your users create a shortcut as part of their ordinary workflow. Testing shortcuts To test your app's shortcuts, install your app on a device with a launcher that supports shortcuts. Then, perform the following actions Long-tap on your app's launcher icon to view the shortcuts that you've defined for your app. Tap and drag a shortcut to pin it to the device's launcher.
2 Shortcut Keyboard CTRL+Alt+Delete. Task Manager Shortcut. Sumber foto: Howtogeek. Selain kombinasi tombol di atas, kamu juga dapat mengakses Task Manager dari layar dengan menekan CTRL+Alt+Delete seperti kebanyakan orang menyebutnya.
OpenChrome on your Android phone. Tap the three dots at the top of the screen. Select Settings . Navigate to Theme . Tap Dark to turn on Dark Mode. Alternatively, you can enable systemwide dark mode on your Android phone by navigating to Settings > Display and toggling Dark Mode to on.
Caramembuat Shortcut desktop untuk membuka situs web menggunakan browser Chrome-Edge-FirefoxGunakan Code:%windir%\ 1 Klik [Start] lalu pada Start Menu yang muncul cari aplikasi yang ingin Anda bikin ( keyboard) shortcut -nya. Begini Cara Membuat Shortcut untuk Membuka Aplikasi pada Windows 10: Klik [Start] lalu cari aplikasi yang ingin Anda bikin shortcut-nya. 2a. Klik kanan pada aplikasi tersebut dan pada menu yang muncul klik [More] > [Open file location