code: public static Observable<String> getPathFromUriForMediaDocument(final Context context,
        final Uri mediaUri, final String mediaDocumentId) {
      return Observable.fromCallable(new Func0<String>() {
        @Override
        public String call() {
          String pathFound = null;
          Cursor cursor = context.getContentResolver()
              .query(mediaUri, null, Constants.ID_COLUMN_VALUE + " =?",
                  new String[] { mediaDocumentId }, null);
          if (cursor != null) {
            if (cursor.moveToFirst()) {
              pathFound =
                  cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA));
            }
            cursor.close();
            logDebug("Path found:" + pathFound);
          }
          return pathFound;
        }
      });
    }
docs: /*
  Get path from Uri, for a MediaDocument.