如何在我们的Android应用程序中使用谷歌授权服务?

时间:2011-09-30 05:50:13

标签: android google-api

我在Android中制作谷歌日历应用程序,我不知道如何在我们的Android应用程序中使用谷歌授权服务?

3 个答案:

答案 0 :(得分:2)

project描述了Google身份验证和此tutorial日历。

答案 1 :(得分:1)

答案 2 :(得分:1)

HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("<URL HERE>");

try {

    List<NameValuePair> parameters = new ArrayList<NameValuePair>(2);
    parameters.add(<name_value_pair>);
    parameters.add(<name_value_pair>); 
    httppost.setEntity(new UrlEncodedFormEntity(parameters));


    HttpResponse response = httpclient.execute(httppost);

    StatusLine returned_status = response.getStatusLine();
    int status_code = returned_status.getStatusCode();


} catch (ClientProtocolException e) {
    // TODO Auto-generated catch block
} catch (IOException e) {
    // TODO Auto-generated catch block
}