LauncherApps.IsPackageEnabled(String, UserHandle) 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.
Checks if the package is installed and enabled for a profile.
[Android.Runtime.Register("isPackageEnabled", "(Ljava/lang/String;Landroid/os/UserHandle;)Z", "GetIsPackageEnabled_Ljava_lang_String_Landroid_os_UserHandle_Handler")]
public virtual bool IsPackageEnabled (string? packageName, Android.OS.UserHandle? user);
[<Android.Runtime.Register("isPackageEnabled", "(Ljava/lang/String;Landroid/os/UserHandle;)Z", "GetIsPackageEnabled_Ljava_lang_String_Landroid_os_UserHandle_Handler")>]
abstract member IsPackageEnabled : string * Android.OS.UserHandle -> bool
override this.IsPackageEnabled : string * Android.OS.UserHandle -> bool
Parameters
- packageName
- String
The package to check.
- user
- UserHandle
The UserHandle of the profile.
Returns
true if the package exists and is enabled.
- Attributes
Remarks
Checks if the package is installed and enabled for a profile.
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.