title: How to get file name and real path of Google drive document?
body: <p>I am using the following code to get the file name and path of files in the File Manager. However it does not return a path for Google Drive files. Any idea how to obtain the actual path?</p>
  
  <p>My code -</p>
  
  <pre><code>public String getFilePath() {
      if (uri.getScheme().equalsIgnoreCase("file")) {
          return uri.getLastPathSegment();
      }
  
      cursorLoader.setUri(uri);
      cursorLoader.setProjection(projections);
      Cursor cursor = cursorLoader.loadInBackground();
      int column_index = cursor.getColumnIndexOrThrow(MediaStore.Files.FileColumns.DATA);
      cursor.moveToFirst();
      String realPath = cursor.getString(column_index);
      cursor.close();
  
      if (realPath == null || realPath.isEmpty()) {
          return null;
      }
  
  return null;
  }
  </code></pre>