Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>EDITED: Sorry I just realized that we can sign the apk in debugging mode using debug.keystore. SO, the most important thing is insert the correct SHA1 key in your Google API console. (generated using the JRE7 tool as mentioned by Stephen Wylie in his Google+ post) </p> <p>Also see (developer.android.com/tools/publishing/app-signing.html#debugmode) for the keystore password</p> <p>After some trial and error, I finally able to list files in my google drive Although I am not sure whether this is the most correct answer, but at least I am able to list files now</p> <p>First, please refer to Stephen Wylie updated Google+ post <a href="https://plus.google.com/u/0/114042449736049687152/posts/CD3L8zcJg5Z" rel="noreferrer">https://plus.google.com/u/0/114042449736049687152/posts/CD3L8zcJg5Z</a></p> <p>generate the SHA1 key with your .keystore using the JRE7 tool</p> <p>I am using the .keystore file that I had been using with my google play store (If you do not have any keystore, you can go to your project, click export, then it will request you to create a .keystore file)</p> <p>with the generated SHA1 key, go to your Google API console (it is best if you start from fresh, delete the current project and start a new one)</p> <p>-enable Drive API</p> <p>-enable Drive SDK</p> <p>-go to API ACCESS</p> <p>-create CLIENT ID</p> <p>-IMPORTANT here, choose Installed application &amp; Android</p> <p>-ALSO IMPORTANT, key in your generated SHA1 key</p> <p>-key in your CORRECT package name (com.example.xxx) that you are using in your eclipse project</p> <p>-Go to Drive SDK tab -upload icon</p> <p>-IMPORTANT, key in your CLIENT ID (Client ID for installed applications) from the API Access tab</p> <p>-Insert 3 scopes mentioned in Stephen Wylie post, [/userinfo.email, /userinfo.profile, /auth/drive]</p> <p>-Insert an URL</p> <p>-Tick Multiple File Support</p> <p>Again, make sure your package name in your code is same as the package name you inserted into Google API Console</p> <p>Finally, in eclipse, export your project using the .keystore file you created just now</p> <p>Put the exported APK file into your phone, install and try.</p> <p>Check your LogCat to show the listed files from your Google Drive</p> <p>I had succeeded using this way.</p> <p>EDITED: If you generated the SHA1 key with the debug.keystore, you can skip the "Export" part. Just debug your application is OK. Eclipse will automatically sign the apk with debug.keystore.</p> <p>EDITED: Next time your code is ready, you need to generate a new SHA1 key with your real .keystore, then input into the Google API console.</p> <p>EDITED 2: Make sure your manifest include these</p> <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt; &lt;uses-permission android:name="android.permission.USE_CREDENTIALS" /&gt; &lt;uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /&gt; </code></pre> <p><img src="https://i.stack.imgur.com/0mX4d.png" alt="jars that I used"> <img src="https://i.stack.imgur.com/4y6MJ.png" alt="Imports"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload