React Native WebView only display PDF file in Android

Viewed 379

I'm trying to display a pdf file inside a WebView WITHOUT download it (because some security reasons). I'm using react-native-webview.

In iOS, the PDF file is displaying without any problem. But in Android, when navigate to the screen with the webview, starts a download of the pdf file and, is not displayed on the screen.

There is a way to display directly the pdf file on the screen in the case of Android?

Here is my current code:

  <WebView
        style={styles.webView}
        startInLoadingState
        renderLoading={() => <LoadingIndicator />}
        source={{ uri: document.url }}
   />

Thanks a lot in advance.

0 Answers
Related