ShortcutInfo.Builder.SetIntent(Intent) 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.
Sets the intent of a shortcut.
[Android.Runtime.Register("setIntent", "(Landroid/content/Intent;)Landroid/content/pm/ShortcutInfo$Builder;", "GetSetIntent_Landroid_content_Intent_Handler", ApiSince=25)]
public virtual Android.Content.PM.ShortcutInfo.Builder SetIntent(Android.Content.Intent intent);
[<Android.Runtime.Register("setIntent", "(Landroid/content/Intent;)Landroid/content/pm/ShortcutInfo$Builder;", "GetSetIntent_Landroid_content_Intent_Handler", ApiSince=25)>]
abstract member SetIntent : Android.Content.Intent -> Android.Content.PM.ShortcutInfo.Builder
override this.SetIntent : Android.Content.Intent -> Android.Content.PM.ShortcutInfo.Builder
Parameters
- intent
- Intent
Returns
- Attributes
Remarks
Sets the intent of a shortcut. Alternatively, setIntents(Intent[]) can be used to launch an activity with other activities in the back stack. This is a mandatory field when publishing a new shortcut with ShortcutManager.addDynamicShortcuts(List) or ShortcutManager.setDynamicShortcuts(List). A shortcut can launch any intent that the publisher app has permission to launch. For example, a shortcut can launch an unexported activity within the publisher app. A shortcut intent doesn't have to point at the target activity. The given intent can contain extras, but these extras must contain values of primitive types in order for the system to persist these values.
Android reference for android.content.pm.ShortcutInfo.Builder.setIntent.
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.