LauncherApps.GetSuspendedPackageLauncherExtras(String, UserHandle) Method

Definition

Gets the launcher extras supplied to the system when the given package was suspended via PackageManager#setPackagesSuspended(String[], boolean, PersistableBundle, PersistableBundle, String).

[Android.Runtime.Register("getSuspendedPackageLauncherExtras", "(Ljava/lang/String;Landroid/os/UserHandle;)Landroid/os/Bundle;", "GetGetSuspendedPackageLauncherExtras_Ljava_lang_String_Landroid_os_UserHandle_Handler", ApiSince=28)]
public virtual Android.OS.Bundle? GetSuspendedPackageLauncherExtras (string? packageName, Android.OS.UserHandle? user);
[<Android.Runtime.Register("getSuspendedPackageLauncherExtras", "(Ljava/lang/String;Landroid/os/UserHandle;)Landroid/os/Bundle;", "GetGetSuspendedPackageLauncherExtras_Ljava_lang_String_Landroid_os_UserHandle_Handler", ApiSince=28)>]
abstract member GetSuspendedPackageLauncherExtras : string * Android.OS.UserHandle -> Android.OS.Bundle
override this.GetSuspendedPackageLauncherExtras : string * Android.OS.UserHandle -> Android.OS.Bundle

Parameters

packageName
String

The package for which to fetch the launcher extras.

user
UserHandle

The UserHandle of the profile.

Returns

A Bundle of launcher extras. Or null if the package is not currently suspended.

Attributes

Remarks

Gets the launcher extras supplied to the system when the given package was suspended via PackageManager#setPackagesSuspended(String[], boolean, PersistableBundle, PersistableBundle, String).

The contents of this Bundle are supposed to be a contract between the suspending app and the launcher.

Note: This just returns whatever extras were provided to the system, <em>which might even be null.</em>

Java documentation for android.content.pm.LauncherApps.getSuspendedPackageLauncherExtras(java.lang.String, android.os.UserHandle).

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