Android examples for App:Package
get Package Information Signs
import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; public class Main { public static PackageInfo getPackageInfoSigns(PackageManager pm, String name) { PackageInfo ret = null;//ww w . j ava2 s. c o m try { ret = pm.getPackageInfo(name, PackageManager.GET_SIGNATURES); } 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; } }