How To Disable Web Security When Using Angularjs In Android Webview?
I'm creating an android application in which i want to use angularjs for displaying html contents in my webview.Its not working normally.I just realized that i should disable web s
Solution 1:
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setAllowFileAccessFromFileURLs(true);
webView.getSettings().setAllowUniversalAccessFromFileURLs(true);
These lines enable cross origin requests for file:// protocol but it requires API level at least 16.
Solution 2:
These two lines worked for me...
wv.getSettings().setAllowFileAccessFromFileURLs(true);
wv.getSettings().setAllowUniversalAccessFromFileURLs(true);
Post a Comment for "How To Disable Web Security When Using Angularjs In Android Webview?"