title: How to add client id to Google Drive Client API for Java
body: <p>I'm just getting started with using the Google Drive REST API in an Android app. (I can't use the <a href="https://developers.google.com/drive/android/" rel="nofollow noreferrer">Google Drive API for Android</a> because the app needs to share files, and perhaps a few other things, that GDAA doesn't support.) I'm stuck on a couple of points.</p>
  
  <p>The first has to do with OAuth2.0 credentials. I went through the <a href="https://developers.google.com/drive/v3/web/quickstart/android" rel="nofollow noreferrer">Android quick start example</a> and it works fine. I set up a project on my Google developer console and generated an OAuth2.0 client ID and secret and also downloaded the JSON credentials file. However, the quick start example doesn't show how to plug any of this into the app. The only thing I found in the docs that seems relevant is <a href="https://developers.google.com/api-client-library/java/google-api-java-client/reference/1.20.0/com/google/api/client/googleapis/auth/oauth2/GoogleClientSecrets" rel="nofollow noreferrer"><code>GoogleClientSecrets</code></a>, but I don't see anything about how to use that in an Android app. (The <a href="https://developers.google.com/drive/v3/web/quickstart/java" rel="nofollow noreferrer">Java quick start example</a> uses this, but it's not integrated with Android's account manager and doesn't seem right for an Android app.) When I run the Android version of the quick start app, no activity shows up on my developer console, which suggests to me that the app is running in some sort of anonymous mode. As I understand it, that would limit the app to a very low daily quota of transactions.</p>
  
  <p>Second, I noticed that the GDAA and the REST API for JavaScript both have nice file picker APIs. I couldn't find anything similar in the Java/Android API.</p>
  
  <p>So here are my specific questions:</p>
  
  <ul>
  <li>How do I use my app's OAuth2.0 credentials from the developer console in a REST API for Android Java app? I feel like I'm just missing something obvious.</li>
  <li>Is there a file picker API for the Google Rest API for Android?</li>
  </ul>