B4J Question How to load a html file from DirAssets ?

GMan

Well-Known Member
Licensed User
Longtime User
Here is the code i have, but dont work:

B4X: Copy
    Dim url="file:\\\" & File.Combine(File.DirAssets, "help.html" As String)
    Log("Loading " & url)
    HelpWebView.LoadUrl(url)
 
I used it this way and it works:

B4X: Copy
    Dim url = File.geturi(File.DirAssets,"help.html" As String)
    Log("Loading " & url)
    HelpWebView.LoadUrl(url)

without "as String" it causes a warning
 
Upvote 0
?????

File.geturi(File.DirAssets,"help.html" As String)

1595863733189.png


Dim BaseURL As String = File.GetUri(File.DirAssets,"help.html")
HelpWebView.LoadUrl(BaseURL)
 
Last edited:
Upvote 0
Back
Top