title: Unable to open trivial text file with FileProvider
body: <p>I'm going crazy, I used the new Android <code>FileProvider</code> in the past but I can't get it to work with a (trivial) just-created file in the Download folder.</p>
  
  <p>In my <code>AsyncTask.onPostExecute</code> I call </p>
  
  <pre><code>Intent myIntent = new Intent(Intent.ACTION_VIEW, FileProvider.getUriForFile(mContext, BuildConfig.APPLICATION_ID + ".fileprovider", output));
  myIntent.setType("text/plain");
  myIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
  startActivity(myIntent);
  </code></pre>
  
  <p>My FileProvider XML is like this</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;paths xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;external-path name="Download" path="Download"/&gt;
  &lt;/paths&gt;
  </code></pre>
  
  <p>In Genymotion emulator I always get, choosing Amaze Text Editor as target app:
  <a href="https://i.stack.imgur.com/XCJZZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XCJZZ.png" alt="enter image description here"></a></p>
  
  <p>While I can see the file content with HTML Viewer:
  <a href="https://i.stack.imgur.com/CD9yt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CD9yt.png" alt="enter image description here"></a></p>
  
  <p>I can't understand this behavior and fix what should be a trivial thing like opening a pure-text file with the desidered text editor.</p>
  
  <p>thanks a lot
  nicola</p>