how to programmatically download a public Google Drive file?

You don't need any Google SDK if you know the link and the file is public. Just use a standard HTTP GET method to download the file.


This is an older question (and already has an accepted answer), but Google just announced a new way to tackle this problem that makes it quite a bit easier to solve; basically, you can now (as of 11/28/2012) make a folder and set the folder to be public, and then any file put in the folder can be downloaded via HTTP GET without ever getting an intermediate page (regardless of the filesize). Details:

http://googleappsdeveloper.blogspot.com/2012/11/announcing-google-drive-site-publishing.html