我在Android中制作谷歌日历应用程序,我不知道如何在我们的Android应用程序中使用谷歌授权服务?
答案 0 :(得分:2)
答案 1 :(得分:1)
检查OAuth概念,您可以通过此OAuth实现。
查看此帖子链接
Android Google Calendar Authorization Problem
Synchronising Google Calendar to my application in Android
Google calendar: how to access it on android
http://code.google.com/p/google-api-java-client/wiki/Android
答案 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
}