Introduction: Register an Android application for a 3rd party like Facebook. We always need Hash key of APK. Here, i'm going to explain a simple code snippet that gets hash key of your debug and release Apk.
So, First of all, if you want Hash key of debugging apk just paste the following code snippet anywhere in your Java/Kotlin class.
Now, If you want hash key of release Apk. You can do it with simple two steps.
1. The first step is the same as above.
2. Now generate release Apk. Install it in the device and connect it with android studio and press ALT+6. You will see Hash key as above. After that, you can delete code snippet and generate another singed build.
So, First of all, if you want Hash key of debugging apk just paste the following code snippet anywhere in your Java/Kotlin class.
Now press ALT+6, You will see hash key in the log.
Now, If you want hash key of release Apk. You can do it with simple two steps.
1. The first step is the same as above.
2. Now generate release Apk. Install it in the device and connect it with android studio and press ALT+6. You will see Hash key as above. After that, you can delete code snippet and generate another singed build.