In this post, we want to discuss about a nice function to generate sha-1 key android or SHA-1 fingerprint of keystore certificate by Android Studio. Before we get started, if you want to know about use custom font in android studio, please go through the following article: How to use custom font in Android Studio.

Secure Hash Algorithm 1 or SHA-1 hash value is typically rendered as a hexadecimal number, 40 digits long used by organizations like Google, Facebook etc uses SHA-1 hash value for secure connection between their services and clients. Being it is an important part of establishing a secure connection between two end points and developers may need it frequently i think it is worth explaining about how to get SHA-1 hash value for a application.

If you are using Android Studio, you can find SHA-1 fingerprint of keystore certificate by very simple two way. The ways are following down:

First Way with Gradle Menu
  1. Run your project
  2. Click on Gradle menu
  3. Expand Gradle task tree
  4. Click on android-> signingReport and see the magic
  5. It will tell you everythingsigningReport of Android Studio
  6. Result Under Run Tab If Android Studio < 2.2Sha1 Key of Android Studio < 2.2
  7. From android studio 2.2
    Result will be available under Run console but use highlighted toggle buttonSha1 Key of Android Studio 2.2
Second Way with Google Maps Activity
  1. Create new project in android studio New -> Google Maps ActivityGenerate SHA-1 fingerprint of keystore certificate by Android Studio | TechAid24
  2. then open google_maps_api.xml xml file as shown in pics you will see your SHA keyGenerate SHA-1 fingerprint of keystore certificate by Android Studio | TechAid24
generate sha-1 key android

Leave a Comment