-
-
Save jimmgarrido/b3a1bd8fc130435b53f62cb5736368a9 to your computer and use it in GitHub Desktop.
Android AllowUniversalAccessFromFileURLs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.Android; | |
namespace WebviewDemo.Droid | |
{ | |
public class CustomWebViewRenderer : WebViewRenderer | |
{ | |
protected override void OnElementChanged(ElementChangedEventArgs<WebView> e) | |
{ | |
base.OnElementChanged(e); | |
if (Control != null) | |
Control.Settings.AllowUniversalAccessFromFileURLs = true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment