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
B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    Activity.LoadLayout("page4")
    Activity.Title = "DITL - Weather"
    WebView1.LoadHtml($"<a href="http://www.accuweather.com/en/gb/rhyl/ll18-4/weather-forecast/322483" 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="https://oap.accuweather.com/launch.js"></script>"$)
    Activity.AddMenuItem("Home","mnuPage1")
    Activity.AddMenuItem("Tide Tables","mnuPage2")
    Activity.AddMenuItem("GPS","mnuPage3")
    Activity.AddMenuItem("Knots","mnuPage4")
    Activity.AddMenuItem("Weather","mnuPage5")
    Activity.AddMenuItem("Rhyl Charts","mnuPage6")
    Activity.AddMenuItem("Exit","mnuPage7")      
End Sub

Can anyone help
Many thanks
 
Last edited:

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

Colin Evans

Active Member
Licensed User
Longtime User
Okay retried it and used the WebView1.LoadUrl and it works, many thanks
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…