LauncherApps Class
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.
Class for retrieving a list of launchable activities for the current user and any associated
managed profiles that are visible to the current user, which can be retrieved with
#getProfiles
.
[Android.Runtime.Register("android/content/pm/LauncherApps", DoNotGenerateAcw=true)]
public class LauncherApps : Java.Lang.Object
[<Android.Runtime.Register("android/content/pm/LauncherApps", DoNotGenerateAcw=true)>]
type LauncherApps = class
inherit Object
- Inheritance
- Attributes
Remarks
Class for retrieving a list of launchable activities for the current user and any associated managed profiles that are visible to the current user, which can be retrieved with #getProfiles
. This is mainly for use by launchers.
Apps can be queried for each user profile. Since the PackageManager will not deliver package broadcasts for other profiles, you can register for package changes here.
To watch for managed profiles being added or removed, register for the following broadcasts: Intent#ACTION_MANAGED_PROFILE_ADDED
and Intent#ACTION_MANAGED_PROFILE_REMOVED
.
Note as of Android O, apps on a managed profile are no longer allowed to access apps on the main profile. Apps can only access profiles returned by #getProfiles()
.
Java documentation for android.content.pm.LauncherApps
.
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.
Constructors
LauncherApps(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Fields
ActionConfirmPinAppwidget |
Activity Action: For the default launcher to show the confirmation dialog to create a pinned app widget. |
ActionConfirmPinShortcut |
Activity Action: For the default launcher to show the confirmation dialog to create a pinned shortcut. |
ExtraPinItemRequest |
An extra for |
Properties
AllPackageInstallerSessions |
Return list of all known install sessions in this user and managed profiles, regardless of the installer. |
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
HasShortcutHostPermission |
Returns whether the caller can access the shortcut information. |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
Profiles |
Return a list of profiles that the caller can access via the |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Methods
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetActivityList(String, UserHandle) |
Retrieves a list of activities that specify |
GetApplicationInfo(String, PackageInfoFlags, UserHandle) |
Returns |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetPinItemRequest(Intent) |
A helper method to extract a |
GetShortcutBadgedIconDrawable(ShortcutInfo, Int32) |
Returns the shortcut icon with badging appropriate for the profile. |
GetShortcutConfigActivityIntent(LauncherActivityInfo) |
Returns an intent sender which can be used to start the configure activity for creating custom shortcuts. |
GetShortcutConfigActivityList(String, UserHandle) |
Retrieves a list of config activities for creating |
GetShortcutIconDrawable(ShortcutInfo, Int32) |
Returns the icon for this shortcut, without any badging for the profile. |
GetShortcutIntent(String, String, Bundle, UserHandle) |
Returns PendingIntent associated with specified shortcut. |
GetShortcuts(LauncherApps+ShortcutQuery, UserHandle) |
Returns |
GetSuspendedPackageLauncherExtras(String, UserHandle) |
Gets the launcher extras supplied to the system when the given package was suspended via
|
IsActivityEnabled(ComponentName, UserHandle) |
Checks if the activity exists and it enabled for a profile. |
IsPackageEnabled(String, UserHandle) |
Checks if the package is installed and enabled for a profile. |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
PinShortcuts(String, IList<String>, UserHandle) |
Pin shortcuts on a package. |
RegisterCallback(LauncherApps+Callback, Handler) |
Registers a callback for changes to packages in this user and managed profiles. |
RegisterCallback(LauncherApps+Callback) |
Registers a callback for changes to packages in this user and managed profiles. |
RegisterPackageInstallerSessionCallback(IExecutor, PackageInstaller+SessionCallback) |
Register a callback to watch for session lifecycle events in this user and managed profiles. |
ResolveActivity(Intent, UserHandle) |
Returns the activity info for a given intent and user handle, if it resolves. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
ShouldHideFromSuggestions(String, UserHandle) |
Returns whether a package should be hidden from suggestions to the user. |
StartAppDetailsActivity(ComponentName, UserHandle, Rect, Bundle) |
Starts the settings activity to show the application details for a package in the specified profile. |
StartMainActivity(ComponentName, UserHandle, Rect, Bundle) |
Starts a Main activity in the specified profile. |
StartPackageInstallerSessionDetailsActivity(PackageInstaller+SessionInfo, Rect, Bundle) |
Starts an activity to show the details of the specified session. |
StartShortcut(ShortcutInfo, Rect, Bundle) |
Launches a shortcut. |
StartShortcut(String, String, Rect, Bundle, UserHandle) |
Starts a shortcut. |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterCallback(LauncherApps+Callback) |
Unregisters a callback that was previously registered. |
UnregisterFromRuntime() | (Inherited from Object) |
UnregisterPackageInstallerSessionCallback(PackageInstaller+SessionCallback) |
Unregisters a callback that was previously registered. |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |