0
votes

I am new to use the Google API. I am trying to retrieve the Google calendar API and show the events data to users. I have gone through "http://samples.google-api-java-client.googlecode.com/hg/calendar-android-sample/instructions.html?r=default", But I am struck with API-key generation.

Could please tell me the how to generate the oauth2.0 key using openssl.

I am planning to consume the Google calendar API using rest web services, so could please help me how to consume the Google calendar API using rest web services instead of client libraries.

Thanks & Regards mini.

1

1 Answers

1
votes
  1. Find out the location of your debug certificate. Go to Eclipse: Window--> Preferences-->Android-->Build The location of the file will be at the bottom in 'Default debug keystore' or 'Custom debug keystore'. Make a note of this.
  2. Find out the location of your Java JDK's bin folder. In my case it is: 'C:\Program Files\Java\jdk1.7.0_17\bin'. This depends on the JDK version you have.

    Open a command window there. (On Windows 7: SHIFT+ right click on the folder then select 'Open command window here' from the context menu.)

  3. Get the SHA1 fingerprint from your keystore using the Keystore tool. (See screenshot)

    keystore -list keystore 'path-to-your-keystore'
    

    (In my case it is: C:\Users\D\.android\debug.keystore)

    Enter the password for your keystore then make a note of the SHA1 certificate fingerprint. If you are using the default Android debug key then the password is: 'android.

  4. Register the app and the SH1 fingerprint on Google apis console as per the instructions on that link you included. 'Create another client ID' --> Select 'Installed application' --> select 'Android' --> Enter package name for your app and the SHA1 fingerprint from the previous step --> 'Create client ID'

  5. Repeat steps 2-4 with your release certificate.

That's it, the example app should work now. Good luck.

enter image description here