Skip to main content

How To Get KeyHash, MD5 , SHA1, SHA256 of keystore

Here is the Steps,

WINDOWS

Step1 : We need to download openssl from Google code (64 bit users must download openssl-0.9.8e X64, not the latest version).

Step2 :  Extract it. and create a folder- "OpenSSL" in C:/ and copy the extracted code here.First open a terminal and go to JAVA\bin.

Step3 : Detect keystore file path and go to that directory in command promp (cmd).

Step4 : Type this command in 1 line.
keytool -exportcert -alias androiddebugkey -keystore "C:\path to keystore\keystore_name.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary |"C:\OpenSSL\bin\openssl" base64

If it is not Working Use This,

keytool -list -v -keystore  C:\path to keystore\keystore_name.keystore

Step5 : Now, it will ask for password, Enter the password (Password of  default keystore will be  android for the default keystore ).


MAC

Step1 :  First open a terminal.

Step2 :  Navigate in the terminal to the directory where your Android debug.keystore is stored.

Step3 : Mostly the default keystore location in MAC will be in “/Users/user_name/.android/” .  Once you are in the keystore directory, run the following command.

Step4 :  keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64

If it is not Working Use This,

keytool -list -v -keystore  C:\path to keystore\keystore_name.keystore


 Here  debug.keystore is the keystore name. Replace this name with your keystore name.

Step5 : When it prompts you for a password then press Enter. (Password of  default keystore will be  android for the default keystore ).



Popular posts from this blog

Importing Image From Camera

In this tutorial I want to explain how to take a picture in camera ans import that picture to am imageview,

In this I am having One Button and One ImageView. While Tap on the button it will open Camera. After that the user can take photo After taking photo it will ask for save image. If the user save the image then it will display on the Imageview.

activity_main.xml

This is a Layout of main page. This layout contain One Button and one Imageview.



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="top|center"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/BtnSelectImg"
        android:layout_width="wrap_content"
        android:layout_height="wrap_con…

How to pass Boolean, Int, String, Integer ArrayList, String ArrayList, int list and String List with an intent.

In this blog I want to explain How to pass Boolean, Int, String, Integer ArrayList, String ArrayList, int list and String List with an intent.


Intent
                Intent is an object that is used to launch an activity or to return information  from an activity.  To start a new activity using startActivity(intent).  To get information from another activity we start activity using startActivityForResult(intent, requestCode).


               Here in  FromPage.java we are adding  Boolean, Int, String, Integer ArrayList, String ArrayList, int list and String List values to an intent. In ToPage.java We extract added values will retrieve from intent. 


FromPage.java

ArrayList<Integer>  IntArrayList = new  ArrayList<Integer>(Arrays.asList(100,13,18,22,44,13));
ArrayList<String>  StringArrayList = new  ArrayList<String>(Arrays.asList("String1", "String2", "String3", "String4"));

        int[] intList = {4, 6, 3, …

Importing Image From Gallery

In this tutorial I want to explain how to import images from Gallery to am imageview,

In this I am having One Button and One ImageView. While Tap on the button it will redirect to Gallery to Browse image. While we select an image it will display on the Imageview.

activity_main.xml

This is a Layout of main page. This layout contain One Button and one Imageview.



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="top|center"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/BtnSelectImg"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Insert Image" />

    <ImageView
        …