Programming google calendar API within eclipse android java

雨燕双飞 提交于 2019-12-23 03:12:37

问题


So my problem is I am unsure how to start programming a google calendar into my app after 2 weeks of research, reading numerous websites and following google steps. I believe this is due to bad and partially outdated google calendar api documentation.

what i have done:

  • installed google plugin for android
  • registered project with google in google account
  • went to google console and created client id
  • added my projectname and SHA1 fingerprint number

So now I should be able to use google calendar services? I cant get my physical android device to be recognised by eclipse 4.2 which is a separate problem. When it is connected what should I see? How do I manipulate the google calendar? Should I be adding in a 'calendar view' object or should the actual calendar come up? I am really confused and have not found anything up to date on the web that is a good example of this. No one has described exactly how useful this api is and whether the calendar shows up or the sort of code that you should use. I really want someone with past experience and up-to-date knowledge of this api.


回答1:


Just thought I would answer this for those who are really stuck and dont know where to start like I was as there are very poor instructions out there.

  1. Firstly go to this link -> http://developers.google.com/google-apps/calendar/ and follow all the instructions to set up your project with google.
  2. Once you get to "Configure your app" you are likely to be stuck as the code does not work
  3. Download mercurical so that you can download example google projects, e.g. the calendar.
  4. Open your command window by typing 'cmd' into your start menu and pressing enter (for windows)
  5. Navigate to this link -> http://code.google.com/p/google-api-java-client/source/checkout?repo=samples
  6. Then copy and paste hg clone //code.google.com/p/google-api-java-client.samples/ into the terminal window. Wait for it to finish downloading (will take a few minutes)
  7. Look at the path you downloaded the file to: eg, c:\Users\>
  8. Go to that directory in your folders and you will have the example apps.

You will have to import it into Eclipse or your prefered environment. And now at least you can see code and figure out how to use it from there! Just wish someone somewhere could of been kind enough to start a buddy off with these simple steps.



来源:https://stackoverflow.com/questions/15850834/programming-google-calendar-api-within-eclipse-android-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!