Last active
July 6, 2017 13:22
-
-
Save hitesh-dhamshaniya/38923f265fd6d25dd7d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
PackageInfo info = getPackageManager().getPackageInfo("your.package.name", PackageManager.GET_SIGNATURES); | |
for (android.content.pm.Signature signature : info.signatures) { | |
MessageDigest md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); | |
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT)); | |
} | |
} catch (NameNotFoundException e) { | |
} catch (NoSuchAlgorithmException e) { | |
} | |
For get device SHA and use for craete facebook app in developer.facebook.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Facebook key hash code