title: Cordova errorUrl with file:// URI throws FileUriExposedException
body: <p>We are using cordova for few years and always used the ErrorUrl preference on the config.xml to point to html page in the application bundle. For example:
  <code>&lt;preference name="ErrorUrl" value="file:///android_asset/www/offline.html" /&gt;</code></p>
  
  <p>This page was shown when the application is being loaded and there is no internet connectivity or remote server assets are not available, instead of the generic error page / popup.
  (As mentioned on cordova docs - "If set, will display the referenced page upon an error in the application instead of a dialog with the title "Application Error".")</p>
  
  <p>Now we're adapting our android application to support latest target API as google request, and when running our app while phone is offline, the cordova tries to go to this offline.html page and we have an exception - <strong>android.os.FileUriExposedException: file:///android_asset/www/offline.html exposed beyond app through Intent.getData()</strong></p>
  
  <p>This is due to changes on Android Nougat 7.0:</p>
  
  <p><a href="https://developer.android.com/about/versions/nougat/android-7.0-changes#permfilesys" rel="nofollow noreferrer">https://developer.android.com/about/versions/nougat/android-7.0-changes#permfilesys</a>
  which mentions:</p>
  
  <p><strong>Passing file:// URIs outside the package domain may leave the receiver with an unaccessible path. Therefore, attempts to pass a file:// URI trigger a FileUriExposedException. The recommended way to share the content of a private file is using the FileProvider.</strong></p>
  
  <p>I found also this:
  <a href="https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en" rel="nofollow noreferrer">https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en</a></p>
  
  <p>We didn't manage to solve this errorUrl issue using the FileProvider and I didn't find any complain or solution to such issue on cordova.</p>
  
  <p>Are you familiar with this issue and solution?
  <strong>Our asset are located on remote server and as well the js files of the plugins</strong>, so we can't use the offline events of the 'cordova-plugin-network-information' since it's js file wasn't loaded yet if the phone is offline.</p>
  
  <p>Thanks!</p>