I need to load a WebView with an HTML file, from a directory other than File.DirAssets. But in doing that, I'm always getting the following ERR_ACCESS_DENIED message within the WebView:
Here are the two pertinent lines in my code. I put simple text into info.html and place it in File.DirInternal. Then I load it into my WebView (wvEventInfo).
My targer SDK is 34. I'm aware that at some point, Google Android may no longer allow the LoadUrl function. Have we arrived at that point already? Otherwise, I'm stumped as to why I'm getting the error. I know I could just load the html into the WebView directly, with LoadHTML, but I can't do that because the HTML will have custom font CSS in it, which requires that the font.ttf file be in the same directory. I'd appreciate any help or comments on this.
Here are the two pertinent lines in my code. I put simple text into info.html and place it in File.DirInternal. Then I load it into my WebView (wvEventInfo).
B4X:
...
File.WriteString(File.DirInternal,"info.html","This should display in the WebView.")
wvEventInfo.LoadUrl("file://" & File.Combine(File.DirInternal,"info.html"))
...
My targer SDK is 34. I'm aware that at some point, Google Android may no longer allow the LoadUrl function. Have we arrived at that point already? Otherwise, I'm stumped as to why I'm getting the error. I know I could just load the html into the WebView directly, with LoadHTML, but I can't do that because the HTML will have custom font CSS in it, which requires that the font.ttf file be in the same directory. I'd appreciate any help or comments on this.