title: React Native display PDF in Android web view
body: <p>I have a React Native app in which at some page I've got a web view (<code>react-native-webview</code>) for displaying PDFs from our server.</p>
  
  <p>In iOS everything works fine, in Android, whenever I try to view the file I got:</p>
  
  <p><code>Cannot downoad files as permission was denined. Please provide permission to write to storage, in order to download files.</code></p>
  
  <p>I've then added <code>&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;</code> to my manifest. Now, I'm getting the following alert:</p>
  
  <p><a href="https://i.stack.imgur.com/3vNmZ.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/3vNmZ.jpg" alt="enter image description here"></a></p>
  
  <p>I think it's pretty scary and very stupid from a user experience perspective. I'm not accessing photos, media, or files, all I'm trying to do is to display a simple PDF inside a web view. I don't want my users to be presented such alert.</p>
  
  <p>When I tap allow, it says <code>Downloading...</code> and downloads the PDF like a file that can be opened outside my app. I don't want this behavior, I want PDF to render inside web view just like iOS does.</p>
  
  <p>How can I display PDFs in Android using React Native web view, without a scary dialog which has nothing to do with what I'm actually trying to do?</p>
  
  <p>(I'm on React Native 0.59.9, Android 8.1, Android SDK 28, <code>react-native-web-view</code> 5.12.0)</p>