After a chat we found what the problems where. The payload wrong and the content-type was set wrong. The following code is the solution:
HttpClient client = new DefaultHttpClient();
HttpPost request = new HttpPost("https://accounts.google.com/o/oauth2/token" );
request.setHeader("Content-type", "application/x-www-form-urlencoded");
//Please make this custom with you're credentials
String requestBody = "code=123123132&client_secret=eufFgyAZ8Rmjsk1MaADYsHYW&redirect_uri=urn:ietf:wg:oauth:2.0:oob&grant_type=authorization_code&client_id=128169428269.apps.googleusercontent.com";
try {
request.setEntity(new StringEntity(requestBody));
} catch (UnsupportedEncodingException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
/* Checking response */
try {
HttpResponse response = client.execute(request);
String results = "ERROR";
results = EntityUtils.toString(response.getEntity());
Log.d("STACK", "Response::" + results);
} catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}