did you try loadhtml also:
HelpView.Loadhtml(File.ReadString(File.DirAssets, "index.html") )
Ok, this worked, "sort of".
It loads the index page but none of the links work.
I managed to get it all working with the following simple code, but it
only works if I compile in
release mode.
HelpView.LoadUrl("file:///android_asset/index.html")
In
debug mode the links in the document are invalid.
Compiling in debugger mode makes use of a virtual assets folder. I can get the name of this folder with
jo.GetField("virtualAssetsFolder")
but when I apply this to the File.ReadString method the extra forward slashes are stripped away so the method fails.
So, GetField returns the following, as expected;
"file://" & jo.GetField("virtualAssetsFolder")
file:///data/user/0/B4A.turbineBalancer/files/virtual_assets/
and getting the filename returns the following, as expected;
jo.RunMethod("getUnpackedVirtualAssetFile", Array As Object("index.html"))
index.html.unpacked
Using the above returned strings, ReadString then attempts to read the following file;
File.ReadString(dir, file)
file:/data/user/0/B4A.turbineBalancer/files/virtual_assets/index.html.unpacked
Note the additional 2 forward slashes are stripped so the file path is now invalid.
And if I combine the folder and the filename and use it as a URL I get a blank WebView. No error messages, just a blank.
HelpView.LoadUrl(File.Combine(dir, file))
I tried many things but cannot seem to get around this hurdle.
It does not stop me carrying on with development, but it is a pita when I need to revert to release mode to work on parts of the code.