Answer the question
In order to leave comments, you need to log in
How to display pptx in WebView?
You need to either display the .pptx and .mp4 content inside the app or open it in a third party app installed on the device. As I understand it, opening it in a third-party application is quite problematic, so I decided to try to display the file inside the WebView.
With mp4 everything is ok, but with pptx the problem is on android. On ios everything is ok. Object {uri: 'file:///......'} is passed to source WebView Error occurs
java.lang.IllegalArgumentException: Can only download HTTP/HTTPS URIs: file:///<path_to_file>.pptx
at android.app.DownloadManager$Request.<init>(DownloadManager.java:494)
at abi36_0_0.host.exp.exponent.modules.api.components.webview.RNCWebViewManager$2.onDownloadStart(RNCWebViewManager.java:2)
if (scheme == null || (!scheme.equals("http") && !scheme.equals("https"))) {
throw new IllegalArgumentException("Can only download HTTP/HTTPS URIs: " + uri);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question