delight-im / Android-AdvancedWebView

Enhanced WebView component for Android that works as intended out of the box
MIT License
2.39k stars 576 forks source link

ERR_ACCESS_DENIED #245

Open Anth06ny opened 5 years ago

Anth06ny commented 5 years ago

Hello,

I ll try to switch my application from Webview to your AdvancedWebView but when i try lo load this

wv.loadUrl("file:///${filesDir.path}/mywebsite/index.html?id=browser-bbaia")

I have ERR_ACCESS_DENIED on the AdvancedWebView. But it's work with normal WebView

Do you have any idea ?

ocram commented 5 years ago

Does one of these two calls help?

mWebView.getSettings().setAllowFileAccess(true);

// or

mWebView.setAllowAccessFromFileUrls(mWebView.getSettings(), true);

Ideally, you should test them in isolation (and only use both if necessary), so that we know which one is needed.