getSupportPackageInfo

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

Note: [PackageManager.getPackageInfo(String, int)] has been deprecated starting with [Build.VERSION_CODES#TIRAMISU].

Return

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).

Parameters

packageName

The full name (i.e. com.google.apps.contacts) of the desired package.

flags

Additional option flags to modify the data returned.