How can I generate the right release key hash in Ubuntu? I have already referred this but i can't get my answer.
Generating release key hash in Linux OS(Ubuntu) : Android Facebook SDK
Asked Answered
The solution you refer to is exactly what you need. Were you able to run the command? –
Seclusive
@Seclusive i got both solution which i looking for.Thanks –
Torture
After trying many time i got solution for fragment
which give me a release key hash.
try {
PackageInfo info = getActivity().getPackageManager().getPackageInfo(
"com.yourappname.app",
PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash", "KeyHash:" + Base64.encodeToString(md.digest(),
Base64.DEFAULT));
Toast.makeText(getActivity().getApplicationContext(), Base64.encodeToString(md.digest(),
Base64.DEFAULT), Toast.LENGTH_LONG).show();
}
} catch (PackageManager.NameNotFoundException e) {
} catch (NoSuchAlgorithmException e) {
}
And i got this command from here for terminal which give me release key hash.
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
GET_SIGNATURES
is deprecated –
Lipolysis Get SHA1 and convert it using this_link
To get SHA1
if your app is published and you are using Play Store signing key go to Release -> app signing and copy SHA1.
if using app production SHA1 go to gradle from the right side menu and type signingReport the run
© 2022 - 2025 — McMap. All rights reserved.