WebUI X Documentation
    Preparing search index...

    Interface PackageManager

    Provides access to Android package management functionality.

    This interface allows you to query information about installed applications, retrieve app metadata, get application icons, and list installed packages. It's essential for building tools that need to inspect or manage Android apps.

    interface PackageManager {
        getApplicationIcon(packageName: string): null | string;
        getApplicationIcon(packageName: string, flags: number): null | string;
        getApplicationIcon(
            packageName: string,
            flags: number,
            userId: number,
        ): null | string;
        getApplicationInfo(packageName: string): string;
        getApplicationInfo(packageName: string, flags: number): string;
        getApplicationInfo(
            packageName: string,
            flags: number,
            userId: number,
        ): string;
        getInstalledPackages(): string;
        getInstalledPackages(flags: number): string;
        getInstalledPackages(flags: number, userId: number): string;
    }
    Index

    Methods

    • Gets the application icon as a base64-encoded string.

      Parameters

      • packageName: string

        The package name whose icon to retrieve

      Returns null | string

      Base64-encoded image string, or null if the icon cannot be retrieved

    • Gets the application icon as a base64-encoded string with flags.

      Parameters

      • packageName: string

        The package name whose icon to retrieve

      • flags: number

        Additional flags for icon retrieval

      Returns null | string

      Base64-encoded image string, or null if the icon cannot be retrieved

    • Gets the application icon as a base64-encoded string for a specific user.

      Parameters

      • packageName: string

        The package name whose icon to retrieve

      • flags: number

        Additional flags for icon retrieval

      • userId: number

        The user ID to query the icon for

      Returns null | string

      Base64-encoded image string, or null if the icon cannot be retrieved

    • Gets detailed information about a specific application package.

      Parameters

      • packageName: string

        The package name to look up (e.g., "com.example.app")

      Returns string

      A JSON string containing WXApplicationInfo, or empty object "{}" if not found

    • Gets detailed information about a specific application package with flags.

      Parameters

      • packageName: string

        The package name to look up

      • flags: number

        Additional flags to control what information is retrieved

      Returns string

      A JSON string containing WXApplicationInfo, or empty object "{}" if not found

    • Gets detailed information about a specific application package with flags for a specific user.

      Parameters

      • packageName: string

        The package name to look up

      • flags: number

        Additional flags to control what information is retrieved

      • userId: number

        The user ID to query packages for (useful for multi-user devices)

      Returns string

      A JSON string containing WXApplicationInfo, or empty object "{}" if not found

    • Gets a list of all installed package names on the device.

      Returns string

      A JSON string containing an array of package names

    • Gets a list of all installed package names with specific flags.

      Parameters

      • flags: number

        Flags to filter which packages are included in the result

      Returns string

      A JSON string containing an array of package names

    • Gets a list of all installed package names for a specific user with flags.

      Parameters

      • flags: number

        Flags to filter which packages are included in the result

      • userId: number

        The user ID to query packages for

      Returns string

      A JSON string containing an array of package names