private String getSign() {
PackageManager pm = getPackageManager();
List<PackageInfo> apps = pm.getInstalledPackages(PackageManager.GET_SIGNATURES);
Iterator<PackageInfo> iter = apps.iterator();
while (iter.hasNext()) {
PackageInfo packageinfo = iter.next();
String packageName = packageinfo.packageName;
if (packageName.equals(getPackageName())) {
return packageinfo.signatures[0].toCharsString();
}
}
return null;
}