Android examples for App:Package
get Package Information Permission
import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; public class Main { public static PackageInfo getPackageInfoPerms(PackageManager pm, String name) { PackageInfo ret = null;//from w w w . ja va 2 s. c om try { ret = pm.getPackageInfo(name, PackageManager.GET_PERMISSIONS); } catch (NameNotFoundException e) { // e.printStackTrace(); } return ret; } public static PackageInfo getPackageInfo(PackageManager pm, String name) { PackageInfo ret = null; try { ret = pm.getPackageInfo(name, PackageManager.GET_ACTIVITIES); } catch (NameNotFoundException e) { // e.printStackTrace(); } return ret; } }