2

My Problem is, that I want to use any SDK or API to access my google drive from my android phone without using an existing google drive app on my android phone.

I read the instructions on this side: google drive sdk The code examples does only work for desktop applications and the "integrate with Android" topic on the side does not provide any example how I can access my google drive from my android application.

I already read android-api-for-google-drive here but this leads only to more links and how-to's which are far to complicated and fuzzy.

Has anyone experience with connecting to google-drive from an android application and could help with any example code or "clean-and-short-explained" tutorial?

Community
  • 1
  • 1
Jan Koester
  • 1,178
  • 12
  • 26
  • **"...the "integrate with Android" topic on the side does not provide any example how I can access my google drive from my android application."** - Urrrm, it actually goes quite a long way to explaining it with example manifest and `Activity`. What have you tried so far? – Squonk Sep 23 '12 at 22:31
  • The example code in the "integrate with Android" article is for the use case that I choose a file in my android device and then the user has the choice to select the Activity to .I want to send a file from my app to the google drive directly, so I can for example send an image, which I have drawn in my app to my google drive account – Jan Koester Sep 23 '12 at 23:20
  • See the `Files.insert` API. https://developers.google.com/drive/v2/reference/files/insert – Squonk Sep 24 '12 at 01:00

1 Answers1

3

Luckily, just after you asked this question, Google released their Play Services (see this link), which makes it a heck of a lot easier to access files using the Drive SDK & Drive API. Please see my post on Google Plus that gives a step-by-step walkthrough and code example on how to integrate an Android app with Google Drive documents: https://plus.google.com/u/0/114042449736049687152/posts/CD3L8zcJg5Z

In the tutorial, I reference a particular Google IO 2012 talk (slides at https://docs.google.com/presentation/d/1LrEKp2PqESsES3upS1xsSARz35KS-9QHnYFTKvS2yzM/preview#slide=id.p19), but please read my G+ post because I go through the various flaws, pitfalls, and omitted details from this presentation.

Before you start coding anything, get yourself signed up for the Google APIs (see this link), get into the API Console, and turn on both the Google Drive API and Drive SDK.

Good luck & have fun!

David
  • 3,392
  • 3
  • 36
  • 47
Stephen Wylie
  • 924
  • 7
  • 10