Get installed package list - Android App

Android examples for App:Package

Description

Get installed package list

Demo Code


//package com.java2s;
import java.util.List;
import android.content.Context;

import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;

public class Main {

    public static List<PackageInfo> getInstalledPackages(Context context) {
        PackageManager pkgManager = context.getPackageManager();
        return pkgManager
                .getInstalledPackages(PackageManager.GET_UNINSTALLED_PACKAGES);
    }/* w  ww .  j ava 2  s .c om*/
}

Related Tutorials