LauncherApps.StartShortcut Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
StartShortcut(ShortcutInfo, Rect, Bundle) |
Launches a shortcut. |
StartShortcut(String, String, Rect, Bundle, UserHandle) |
Starts a shortcut. |
StartShortcut(ShortcutInfo, Rect, Bundle)
Launches a shortcut.
[Android.Runtime.Register("startShortcut", "(Landroid/content/pm/ShortcutInfo;Landroid/graphics/Rect;Landroid/os/Bundle;)V", "GetStartShortcut_Landroid_content_pm_ShortcutInfo_Landroid_graphics_Rect_Landroid_os_Bundle_Handler", ApiSince=25)]
public virtual void StartShortcut (Android.Content.PM.ShortcutInfo shortcut, Android.Graphics.Rect? sourceBounds, Android.OS.Bundle? startActivityOptions);
[<Android.Runtime.Register("startShortcut", "(Landroid/content/pm/ShortcutInfo;Landroid/graphics/Rect;Landroid/os/Bundle;)V", "GetStartShortcut_Landroid_content_pm_ShortcutInfo_Landroid_graphics_Rect_Landroid_os_Bundle_Handler", ApiSince=25)>]
abstract member StartShortcut : Android.Content.PM.ShortcutInfo * Android.Graphics.Rect * Android.OS.Bundle -> unit
override this.StartShortcut : Android.Content.PM.ShortcutInfo * Android.Graphics.Rect * Android.OS.Bundle -> unit
Parameters
- shortcut
- ShortcutInfo
The target shortcut.
- sourceBounds
- Rect
The Rect containing the source bounds of the clicked icon.
- startActivityOptions
- Bundle
Options to pass to startActivity.
- Attributes
Remarks
Launches a shortcut.
The calling launcher application must be allowed to access the shortcut information, as defined in #hasShortcutHostPermission()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
StartShortcut(String, String, Rect, Bundle, UserHandle)
Starts a shortcut.
[Android.Runtime.Register("startShortcut", "(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Rect;Landroid/os/Bundle;Landroid/os/UserHandle;)V", "GetStartShortcut_Ljava_lang_String_Ljava_lang_String_Landroid_graphics_Rect_Landroid_os_Bundle_Landroid_os_UserHandle_Handler", ApiSince=25)]
public virtual void StartShortcut (string packageName, string shortcutId, Android.Graphics.Rect? sourceBounds, Android.OS.Bundle? startActivityOptions, Android.OS.UserHandle user);
[<Android.Runtime.Register("startShortcut", "(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Rect;Landroid/os/Bundle;Landroid/os/UserHandle;)V", "GetStartShortcut_Ljava_lang_String_Ljava_lang_String_Landroid_graphics_Rect_Landroid_os_Bundle_Landroid_os_UserHandle_Handler", ApiSince=25)>]
abstract member StartShortcut : string * string * Android.Graphics.Rect * Android.OS.Bundle * Android.OS.UserHandle -> unit
override this.StartShortcut : string * string * Android.Graphics.Rect * Android.OS.Bundle * Android.OS.UserHandle -> unit
Parameters
- packageName
- String
The target shortcut package name.
- shortcutId
- String
The target shortcut ID.
- sourceBounds
- Rect
The Rect containing the source bounds of the clicked icon.
- startActivityOptions
- Bundle
Options to pass to startActivity.
- user
- UserHandle
The UserHandle of the profile.
- Attributes
Remarks
Starts a shortcut.
The calling launcher application must be allowed to access the shortcut information, as defined in #hasShortcutHostPermission()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.