Class PackageManagerExtensions

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static PackageInfo getSupportPackageInfo(PackageManager $self, String packageName, Integer flags) Retrieves overall information about an application package that is installed on the system using appropriate API for Android Tiramisu and upwards.
      final static Bundle getMetaData(PackageManager $self, String packageName) Retrieves meta-data information about an application package that is installed on the system using appropriate API for Android Tiramisu and upwards.
      final static List<ResolveInfo> queryIntentActivities(PackageManager $self, Intent fileIntent) Retrieves all activities that can be performed for the given intent using appropriate API for Android Tiramisu and upwards.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getSupportPackageInfo

         final static PackageInfo getSupportPackageInfo(PackageManager $self, String packageName, Integer flags)

        Retrieves overall information about an application package that is installed on the system using appropriate API for Android Tiramisu and upwards.

        <p><b>Note: </b> [PackageManager.getPackageInfo(String, int)] has been deprecated starting with [Build.VERSION_CODES#TIRAMISU].
        Parameters:
        packageName - The full name (i.e.
        flags - Additional option flags to modify the data returned.
        Returns:

        A PackageInfo object containing information about the package. If flag {@code MATCH_UNINSTALLED_PACKAGES} is set and if the package is not found in the list of installed applications, the package information is retrieved from the list of uninstalled applications (which includes installed applications as well as applications with data directory i.e. applications which had been deleted with {@code DELETE_KEEP_DATA} flag set).

      • getMetaData

         final static Bundle getMetaData(PackageManager $self, String packageName)

        Retrieves meta-data information about an application package that is installed on the system using appropriate API for Android Tiramisu and upwards.

        <p><b>Note: </b> [PackageManager.getApplicationInfo(String, int)] has been deprecated starting with [Build.VERSION_CODES#TIRAMISU].
        Parameters:
        packageName - The full name (i.e.
        Returns:

        Additional meta-data associated with a given application.

      • queryIntentActivities

         final static List<ResolveInfo> queryIntentActivities(PackageManager $self, Intent fileIntent)

        Retrieves all activities that can be performed for the given intent using appropriate API for Android Tiramisu and upwards.

        <p><b>Note: </b> [PackageManager.queryIntentActivities(Intent, int)] has been deprecated starting with [Build.VERSION_CODES#TIRAMISU].
        Parameters:
        fileIntent - The desired intent as per Intent.resolveActivity.
        Returns:

        A List of ResolveInfo objects containing one entry for each matching activity, ordered from best to worst. In other words, the first item is what would be returned by Intent.resolveActivity. If there are no matching activities, an empty list is returned.