我必須將Google日曆中的事件導入到我自己的Android應用程序中。我怎樣才能做到這一點?如何使用Google日曆API在Android中獲取Google日曆事件?
這裏我使用了gdata lib,但是在迭代中我得到了一些id而不是tile。
在此先感謝。
DocsService client = new DocsService("myappname");
try {
client.setUserCredentials("[email protected]",
"pwd");
URL feedUri = new URL(
"https://docs.google.com/feeds/default/private/full/");
DocumentListFeed feed = client.getFeed(feedUri,
DocumentListFeed.class);
// TextView textView = (TextView) findViewById(R.id.textView1);
String text = "";
for (DocumentListEntry entry : feed.getEntries()) {
// text += entry.getTitle().getPlainText() + "\r\n";
list.add(entry.getTitle().toString());
}
return list;
// textView.setText(text);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
顯示您到目前爲止嘗試過的。如果您提出有關問題的具體問題,人們會提供幫助,而不是向大問題提供完整解決方案。 –
嗨你是否設法使用谷歌日曆api在android中獲取日曆列表?你可以分享一下如何做到這一點嗎?謝謝 –