Obtaining SHA1 Fingerprint from Android Keystore
SHA1 fingerprint is unique hash or can be called as signature of your application. In old days we use to verify application from client side like providing specific keys. This way of verifying application was vulnerable. By using SHA1 fingerprint we can verify our application from server rather than adding secrete keys inside application. Now a days almost all the services are using SHA1 fingerprint to verify applications. Some of them are google maps API , Firebase, Google Plus sign in etc. In this tutorial i will explain types of SHA1 fingerprint and how we can create SHA1 fingerprint in detail.
Types SHA1 fingerprint
There are two different types of SHA1 fingerprint while creating android applications. First one is debug SHA1 fingerprint and other one is release SHA1 fingerprint. In debug SHA1 fingerprint it is used while developing application. Before uploading app to playstore we have to create release SHA1 fingerprint. Now let’s create this one by one
How to create debug SHA1 fingerprint
STEP 1 : Create or open existing android studio project.
STEP 2 : Go to View -> Tools Window -> Gradle. A small Panel from right of screen will come out as shown below.
STEP 3 : Now inside Gradle window go to your app name -> Tasks -> android. Double click on singingReport to run this script a small window at bottom will come and execute a task after executing you will see output as shown below.
STEP 4 : Inside run window click on Toggle to plain text view as shown below.
after you toggle to plain text view you can see debug MD5 and SHA1 fingerprint as shown below.
How to create release SHA1 fingerprint
STEP 1 : Go to Build -> Generate Signed APK. Window will popup as shown below.
STEP 2 : Now if you already created keystore file then you can provide existing keystore path or create new one by clicking on Create new button. Provide Alias, Password and all other info as you want and create it as shown below. and click on next button.
STEP 3 : In next window select build type as release and check V2 (Full APK Signature). Click finish this will start creating Signed in APK and keystore file.
STEP 4 : After finished creating signed APK and keystore file right click app folder go to module setting inside config and new config provide all the info as we entered while creating signed apk as shown below.
STEP 5 : Now again go to View -> Tools Window -> Gradle. Double click on singingReport to run this script a small window at bottom will come and execute a task after executing you will see output as shown below.
STEP 6 : Inside run window click on Toggle to plain text view as shown below.
after you toggle to plain text view you can see release MD5 and SHA1 fingerprint as shown below.
If you still have any queries, please post them in the comments section below, I will be happy to help you. If you have any other questions in mind then make sure to visit our ask section.