title: How to get any type of file with intent.createChooser android
body: <p>I have this code:</p>
  
  <pre><code>protected void pickFile(View view){
  
      ///Codigo que abre la galeria de imagenes y carga la imagen en displayedImage
  
      Intent intent = new Intent();
      intent.setType("file/*");
      intent.setAction(Intent.ACTION_GET_CONTENT);
      startActivityForResult(Intent.createChooser(intent, "Choose File to Upload"), 1);
  
  }
  
  //It's executed when leaving file system
  @Override
  protected void onActivityResult(int reqCode, int resCode, Intent data){
      super.onActivityResult(reqCode, resCode, data);
  
      if (reqCode == 1 &amp;&amp; resCode == RESULT_OK &amp;&amp; data != null) {
          Uri selectedFile = data.getData();
          RequestMaker.uploadFile(this, selectedFile, "this is a file");
      }
  }
  </code></pre>
  
  <p>What i want to do is to be able to select any file from my phone and send it.</p>
  
  <p>The code works, it opens the chooser and lets me search  for any file. However, there are a few problems i am having:</p>
  
  <ul>
  <li>When i try to access via "Internal Storage" option, i cannot select any item. They are all disabled. I fixed that installing a file manager and it lets me choose the files i want, but maybe there is a quick fix for that.</li>
  <li>When i select the file and run Uri.getPath(), sometimes the path is valid, others, and in general when i am selecting some image file, there is an error with the path i get in return. Is not the actual one.
  I saw some fixes online but they are all for selecting images from the galery, i want the general one.</li>
  </ul>
  
  <p>How can i fix this?</p>