title: How to programmatically share a google drive link on android?
body: <p>I have an android app that saves an image into the Google Drive and shares the weblink to my Google App Engine server (python).</p>
  
  <pre><code>    // Create client
      mGoogleApiClient = new GoogleApiClient.Builder(mContext)
          .addApi(Drive.API)
          .addScope(Drive.SCOPE_FILE)
          .addConnectionCallbacks(this)
          .addOnConnectionFailedListener(this)
          .build();
  
     // handling results after uploading
     final DriveOperationResult&lt;Metadata&gt; driveOperationResultHandler = new DriveOperationResult&lt;Metadata&gt;() {
  
      @Override
      public void onDriveOperationSucceeded(Metadata result) {
          try {
              // Successfully fetched metadata
              onSuccess(driveId,
                        result.getOriginalFilename(),
                        result.getWebContentLink(),
                        result.getWebViewLink(),
                        result.getAlternateLink(),
                        result.getEmbedLink());
          } finally {
              mGoogleDriveClient.disconnectAsync();
          }
      }
  </code></pre>
  
  <p><strong>Note:</strong> result.getEmbedLink() always returns null. Also, result.getAlternateLink() and result.getWebContentLink() are not accessible not accessible if the user is logged-in.</p>
  
  <p>How do I programmatically share the file from Android i.e., make it viewable by everyone (assuming the user is OK with that)</p>