2013-10-10 163 views
0

我必须将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(); 
     } 
+1

显示您到目前为止尝试过的。如果您提出有关问题的具体问题,人们会提供帮助,而不是向大问题提供完整解决方案。 –

+0

嗨你是否设法使用谷歌日历api在android中获取日历列表?你可以分享一下如何做到这一点吗?谢谢 –

回答

相关问题