Android APIs
public static interface

LauncherApps.OnAppsChangedListener

android.content.pm.LauncherApps.OnAppsChangedListener

Class Overview

Callbacks for package changes to this and related managed profiles.

Summary

Public Methods
abstract void onPackageAdded(UserHandle user, String packageName)
Indicates that a package was added to the specified profile.
abstract void onPackageChanged(UserHandle user, String packageName)
Indicates that a package was modified in the specified profile.
abstract void onPackageRemoved(UserHandle user, String packageName)
Indicates that a package was removed from the specified profile.
abstract void onPackagesAvailable(UserHandle user, String[] packageNames, boolean replacing)
Indicates that one or more packages have become available.
abstract void onPackagesUnavailable(UserHandle user, String[] packageNames, boolean replacing)
Indicates that one or more packages have become unavailable.

Public Methods

public abstract void onPackageAdded (UserHandle user, String packageName)

Indicates that a package was added to the specified profile.

Parameters
user The UserHandle of the profile that generated the change.
packageName The name of the package that was added.

public abstract void onPackageChanged (UserHandle user, String packageName)

Indicates that a package was modified in the specified profile.

Parameters
user The UserHandle of the profile that generated the change.
packageName The name of the package that has changed.

public abstract void onPackageRemoved (UserHandle user, String packageName)

Indicates that a package was removed from the specified profile.

Parameters
user The UserHandle of the profile that generated the change.
packageName The name of the package that was removed.

public abstract void onPackagesAvailable (UserHandle user, String[] packageNames, boolean replacing)

Indicates that one or more packages have become available. For example, this can happen when a removable storage card has reappeared.

Parameters
user The UserHandle of the profile that generated the change.
packageNames The names of the packages that have become available.
replacing Indicates whether these packages are replacing existing ones.

public abstract void onPackagesUnavailable (UserHandle user, String[] packageNames, boolean replacing)

Indicates that one or more packages have become unavailable. For example, this can happen when a removable storage card has been removed.

Parameters
user The UserHandle of the profile that generated the change.
packageNames The names of the packages that have become unavailable.
replacing Indicates whether the packages are about to be replaced with new versions.