Roberto P. Well-Known Member Licensed User Longtime User Mar 14, 2016 #1 I need to use setAllowUniversalAccessFromFileURLs function of WebSettings class, but I see that this function is not available in WebViewExtras2 class. related linK: http://developer.android.com/refere...#setAllowUniversalAccessFromFileURLs(boolean) Someone can help me to access this function with Java function? Thank you so much
I need to use setAllowUniversalAccessFromFileURLs function of WebSettings class, but I see that this function is not available in WebViewExtras2 class. related linK: http://developer.android.com/refere...#setAllowUniversalAccessFromFileURLs(boolean) Someone can help me to access this function with Java function? Thank you so much
Erel B4X founder Staff member Licensed User Longtime User Mar 15, 2016 #2 Code: Dim jo As JavaObject = WebView1 Dim settings As JavaObject = jo.RunMethod("getSettings", Null) settings.RunMethod("setAllowUniversalAccessFromFileURLs", Array(True)) Upvote 0
Code: Dim jo As JavaObject = WebView1 Dim settings As JavaObject = jo.RunMethod("getSettings", Null) settings.RunMethod("setAllowUniversalAccessFromFileURLs", Array(True))
Roberto P. Well-Known Member Licensed User Longtime User Mar 15, 2016 #3 Hi Erel, but from an error class not found !? Can you give me some help? Thanks you Attachments errore.png 244.1 KB · Views: 719 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Mar 15, 2016 #4 It is better to post the text instead of a screenshot (right click to copy it). Use this code instead: Code: Dim jo As JavaObject = WebView1 Dim settings As JavaObject = jo.RunMethod("getSettings", Null) Dim r As Reflector r.Target = settings r.RunMethod2("setAllowUniversalAccessFromFileURLs", True, "java.lang.boolean") Upvote 0
It is better to post the text instead of a screenshot (right click to copy it). Use this code instead: Code: Dim jo As JavaObject = WebView1 Dim settings As JavaObject = jo.RunMethod("getSettings", Null) Dim r As Reflector r.Target = settings r.RunMethod2("setAllowUniversalAccessFromFileURLs", True, "java.lang.boolean")
Roberto P. Well-Known Member Licensed User Longtime User Mar 16, 2016 #5 Now does not be error Thanks Upvote 0