Search code examples
javagoogle-docs-api

Google Docs API 3.0 - Downloading a document


I am writing Google Docs to my local app document downloader.

In Google Docs API page:

http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#DownloadingDrawings

They say that:

Important: We highly recommend using the link provided by an entry's content link and not constructing this URL manually.

I have explored all Entry attributes, but I really can't find the appropriate link attribute. Can someone help?


Solution

  • MediaContent mc = (MediaContent) entry.getContent();
    String UrlForDownload = mc.getUri();
    

    Thats it!

    tada!