title: FileProvider: Failed to find configured root
body: <p>I have been trying to share a pdf file, I set up the FileProvider like this:</p>
  
  <p>On the main manifest xml:</p>
  
  <pre><code>&lt;provider
          android:name="android.support.v4.content.FileProvider"
          android:authorities="${applicationId}.fileprovider"
          android:exported="false"
          android:grantUriPermissions="true"&gt;
          &lt;meta-data
              android:name="android.support.FILE_PROVIDER_PATHS"
              android:resource="@xml/file_paths" /&gt;
      &lt;/provider&gt;
  </code></pre>
  
  <p>The res/xml/file_paths.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;paths&gt;
      &lt;files-path name="my_files" path="." /&gt;
  &lt;/paths&gt;
  </code></pre>
  
  <p>And in my code I am trying the following:</p>
  
  <pre><code>String path = root.getAbsolutePath() + "/file.pdf";
  final Uri data = FileProvider.getUriForFile(getApplicationContext(), BuildConfig.APPLICATION_ID+".fileprovider", new File(path));
  getApplicationContext().grantUriPermission(getApplicationContext().getPackageName(), data, Intent.FLAG_GRANT_READ_URI_PERMISSION);
  final Intent intent = new Intent(Intent.ACTION_VIEW).setDataAndType(data, "application/pdf").addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
  getApplicationContext().startActivity(intent);
  </code></pre>
  
  <p>Returns error:</p>
  
  <pre><code>     Caused by: java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/file.pdf
  </code></pre>