title: Google Drive can't access data from another device
body: <p>Ok I have two device both have same gmail account and both have a same app but signed with different keys. SHA1 Keys are configured in Google console. </p>
  
  <p>I am uploading some text files from one device and want to import these files in another device. Now I can upload the files and also get the files in same devices but not able to get uploaded files from another device. The result is empty, However there is no error in log cat.</p>
  
  <p>If I upload files from second devices then I can import these file only from second device. So the problem is importing the files only works from the device which upload the files.</p>
  
  <p>I want to get files no matter from which device I am uploading. </p>
  
  <p>Note - In Google drive app it shows all files no matter from which device the files are uploaded.</p>
  
  <p>Here is the code </p>
  
  <pre><code>private List&lt;File&gt; retrieveAllFiles(Drive service) throws IOException {
          List&lt;File&gt; result = new ArrayList&lt;File&gt;();
          Files.List request = service.files().list();
  
          do {
  
              try {
                  FileList files = request.execute();
  
                  result.addAll(files.getItems());
                  request.setPageToken(files.getNextPageToken());
              } catch (final UserRecoverableAuthIOException e) {
                  System.out.println("An error occurred: " + e);
  
                  request.setPageToken(null);
                  runOnUiThread(new Runnable() {
                      @Override
                      public void run() {
                          startActivityForResult(e.getIntent(),
                                  REQUEST_AUTHORIZATION);
                      }
                  });
  
  
                  break;
              }
          } while (request.getPageToken() != null
                  &amp;&amp; request.getPageToken().length() &gt; 0);
  
          Log.v("result", result.toString());
          return result;
      }
  </code></pre>
  
  <h2>Update</h2>
  
  <p>Here is the auth code</p>
  
  <pre><code>    SharedPreferences preferences = getSharedPreferences("pref",
              MODE_PRIVATE);
      String accountName = preferences.getString("accountName", "");
      credential = GoogleAccountCredential.usingOAuth2(this,
              Arrays.asList(DriveScopes.DRIVE_FILE));
      if (accountName.equals("")) {
  
          startActivityForResult(credential.newChooseAccountIntent(),
  
          REQUEST_ACCOUNT_PICKER);
      } else {
          credential.setSelectedAccountName(accountName);
          service = getDriveService(credential);
  
      }
  </code></pre>