Tuesday, July 26, 2011

OAuth2 with Google Tasks

Hi Guys,
Here is an example for retrieving Google Tasks using OAuth2.
The Sample code is taken from Google, but I changed some stuff since it was not working our of the box.
The most important change was setting the API_KEY:

static final String API_KEY = "AIzaSyCDQ6fgBkku5Hiz_Vta09jIXVs-JHWpUYc";

Currently you can use my API_KEY, but if you build your own application, make sure you generate your own API_KEY.
To do this
  1. Go to the API Console
  2. Create a new project,
  3. Set the status of the Tasks API to On.
  4. Click on the API Access on the Left.
  5. Copy you API key (Under Simple API Access).
Here is the source archive file:
Source

Here is the Android installation file:
Installation

No comments:

Post a Comment