I try to open a PDF file in WebView by using Device.OpenUri(newUri(args.Url));
.
This function is show open failed message when this PDF URL use https but not http.
This function is work in IOS platform. The android platform still work but only when URL is http://xxx.xxx.PDF. If the URL is just web page is work whatever is http or https.
public void WebView_Navigating(object sender, WebNavigatingEventArgs args)
{
if (args.Url.StartsWith("file://"))
{
return;
}
Device.OpenUri(new Uri(args.Url));
args.Cancel = true;
}
This app wouldn't crash when open https://xxx.xxx.PDF but just show messsage can't open this PDF. I try to open in PC is work and IOS is also work too.