In teaching myself the API, that's where I started. I took a lot of the code from their documentation pages, and created a single NetBeans project that connects to Google Docs, lists your documents, creates a new folder, creates a new file in that folder, etc. It was a good starting point for the app I was building, and is probably a good starting point for anyone else who wants to build an app that interfaces with Google Docs.
One of the most annoying parts of creating the project was figuring out just the dependencies that were needed, and getting those .jar files in the right place. For convenience, I include all the necessary .jar files in the download. They're in the Libraries/ directory, and are already referenced by the project.
You can download the sample here: http://www.arbingersys.com/dnlds/GDocsSample.zip
If you have NetBeans installed, simply choose File | Open Project and browse to the GDocsSample/ folder that you've extracted from the archive.
Under Source Packages double-click Main.java and it will open in the editor. On line 59 you'll want to modify the
client.setUserCredentials()
call with your Gmail credentials. Then you should be ready to build and run the project.Enjoy!
Hi,
ReplyDeleteThis code looks interesting. Thanks for the effort and sharing the code with us. I tried the code and it works for me.
with regards
Tushar
Thanks Tushar, good to hear.
ReplyDeletetook me exactly two minutes...wow i'm impressed.keep up the good work.
ReplyDeleteTa,
Doctor
Very well
ReplyDeleteThanks.