0
如何在Android上使用新的API访问谷歌日历? 使用GData API与我可以写这样的代码:使用谷歌API访问谷歌日历
CalendarService myService = new CalendarService("CalendarService");
myService.setUserCredentials("[email protected]", "yourPassword");
URL feedUrl = new URL("http://www.google.com/calendar/feeds/default/allcalendars/full");
CalendarFeed resultFeed = myService.getFeed(feedUrl, CalendarFeed.class);
Log.d(TAG,"Your calendars:");
for (int i = 0; i < resultFeed.getEntries().size(); i++) {
CalendarEntry entry = resultFeed.getEntries().get(i);
Log.d(TAG,entry.getTitle().getPlainText());
}
但我不能在Android上使用这样的代码,因为SAX异常。请告诉我如何使用new V3 api以这种方式授权登录名和密码。