In this post, we want to discuss 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 a secure connection between their services and clients. Being it is an important part of establishing a secure connection between two endpoints and developers may need it frequently I think it is worth explaining how to get SHA-1 hash value for an application.

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

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

The article was published on January 21, 2017 @ 9:27 AM

Leave a Comment