Sdílet prostřednictvím


PackageManager.GetLeanbackLaunchIntentForPackage(String) Method

Definition

Return a "good" intent to launch a front-door Leanback activity in a package, for use for example to implement an "open" button when browsing through packages.

[Android.Runtime.Register("getLeanbackLaunchIntentForPackage", "(Ljava/lang/String;)Landroid/content/Intent;", "GetGetLeanbackLaunchIntentForPackage_Ljava_lang_String_Handler")]
public abstract Android.Content.Intent? GetLeanbackLaunchIntentForPackage (string packageName);
[<Android.Runtime.Register("getLeanbackLaunchIntentForPackage", "(Ljava/lang/String;)Landroid/content/Intent;", "GetGetLeanbackLaunchIntentForPackage_Ljava_lang_String_Handler")>]
abstract member GetLeanbackLaunchIntentForPackage : string -> Android.Content.Intent

Parameters

packageName
String

The name of the package to inspect.

Returns

Returns either a fully-qualified Intent that can be used to launch the main Leanback activity in the package, or null if the package does not contain such an activity.

Attributes

Remarks

Return a "good" intent to launch a front-door Leanback activity in a package, for use for example to implement an "open" button when browsing through packages. The current implementation will look for a main activity in the category Intent#CATEGORY_LEANBACK_LAUNCHER, or return null if no main leanback activities are found.

Java documentation for android.content.pm.PackageManager.getLeanbackLaunchIntentForPackage(java.lang.String).

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