title: Can't get URI for selecting any file from download folder in MI-Oreo(MI-A2) device in android
body: <p>I need help in fetching file path of contents that we pick from downloads folder or any other folder through Intent.
  I am attaching a <a href="https://drive.google.com/file/d/1yLTG7jlEkFNJM3MdczpoL7Yx6LVw_Kcl/view?usp=sharing" rel="nofollow noreferrer">fileUtil</a> class that I have been using and it works well till Nougat version. But with oreo and that too in some specific devices, we receive a null path in return. So if anyone has faced such an error and found a solution to this, then please share here.</p>
  
  <pre><code>if(resultCode ==RESULT_OK)
  {
      final Uri uri = data.getData();
      // Get the File path from the Uri
      String path = FileUtils.getPath(this, uri);
      // Alternatively, use FileUtils.getFile(Context, Uri)
      if (path != null &amp;&amp; FileUtils.isLocal(path)) {
          //File file = new File(path);
          this.file = new File(path);
          profile_imagepath = path;
          filename = file.getName();
          txtselectedfile.setText(filename);
      }
  }
  </code></pre>