Android Question Loading a weather widget with Webview1

Colin Evans

Active Member
Licensed User
Longtime User
Hi, Before I upgraded to the latest version my weather page worked well using Accuweather widget but now all I get is a blank page with Loading Widget being displayed

I've tried it with the Met Office widget but have the same results, just a blank screen

The code is
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.Title = "DITL - Weather"
    WebView1.LoadHtml($"<a href="" class="aw-widget-legal"></a><div id="awcc1496679191204" class="aw-widget-current"  data-locationkey="322483" data-unit="f" data-language="en-us" data-useip="false" data-uid="awcc1496679191204"></div><script type="text/javascript" src=""></script>"$)
    Activity.AddMenuItem("Tide Tables","mnuPage2")
    Activity.AddMenuItem("Rhyl Charts","mnuPage6")
End Sub

Can anyone help
Many thanks
Last edited:


B4X founder
Staff member
Licensed User
Longtime User
I've tried to load the html with on the PC:


It fails to loads a resource because it assumes that the scheme will be http or https. In this case the scheme is file://. You will need to host the html code online and load it with WebView.LoadURL.
Upvote 0

Colin Evans

Active Member
Licensed User
Longtime User
Hi Erel, many thanks for taking the time to reply and explain what the problem appears to be, unfortunately I'm still not sure what I should do to get it working or why it was originally and now isn't. Is it something that the accuweather site have changed and I should ask them, or is there a work around, thanks again.
Upvote 0