Got it, thanks! Here's the snippet of code:
Signature[] sigs =
getBaseContext().getPackageManager().getPackageInfo(getPackageName(),
PackageManager.GET_SIGNATURES).signatures;
for(Signature sig : sigs)
{
byte[] hexBytes = sig.toByteArray();
MessageDigest digest = MessageDigest.getInstance("MD5");
byte[] md5digest = new byte[0];
if(digest != null)
{
md5digest = digest.digest(hexBytes);
StringBuilder sb = new StringBuilder();
for(int i = 0; i < b.length; ++i)
{
sb.append((Integer.toHexString((b[i] & 0xFF) |
0x100)).substring(1, 3));
}
String fingerprintMD5 = sb.toString();
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en