Android Question Why is WebView1.LoadUrl("http://mobi.match.com") a blank screen?

Gregg Homan

Member
Licensed User
Longtime User
Hello,

I have been able to use WebView.LoadUrl() running with B4A V3.20 to browse many different sites; but, oddly, it produces a blank screen for http://mobi.match.com which renders fine on the browser on my Droid Maxx running Android Version 4.4. Can anyone explain why this might be occurring?

Thanks,
Gregg
B4X:
Sub Globals
    Dim WebView1 As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("layoutMain")
    WebView1.LoadUrl("http://mobi.match.com")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
 

Beja

Expert
Licensed User
Longtime User
just do the following:
in designer go to File then "Save AS" (not just "Save") and save the bal file (the layout file).. give it the
same name and click on ok when asked for confirmation.
Then run your app.

Note:
Even if the .bal file is there, just go ahead and save it again. (remember "Save As")

This code is working
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private WebView1 As WebView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("1")
 
    WebView1.LoadUrl("http://google.com")
End Sub
 
Upvote 0

Gregg Homan

Member
Licensed User
Longtime User
Hi Beja,

I tried you suggestion with no success. Please note that I have WebView running for other web sites but, at the moment, it looks to me as if mobi.match.com contains something the WebView does not like. Can you try running your example code above with http://mobi.match.com instead of http://google.com and see if you also get a blank blue screen?

Thanks,
Gregg
 
Upvote 0

qsrtech

Active Member
Licensed User
Longtime User
It looks to me like you're trying to build a dating app to hide from your wife. The designers of b4a went to great lengths to try and prevent this kind of abuse!;)
 
Upvote 0

TomA

Active Member
Licensed User
Longtime User
Hello,

I have been able to use WebView.LoadUrl() running with B4A V3.20 to browse many different sites; but, oddly, it produces a blank screen for http://mobi.match.com which renders fine on the browser on my Droid Maxx running Android Version 4.4. Can anyone explain why this might be occurring?

Thanks,
Gregg

Your problem may be that the url http://mobi.match.com returns a "302 Found" which is a redirect (the destination URL is part of the 302 response). I have not used WebView so I don't know if it handles redirects or if you have to do that with your own code. I have a program called WebBug that can be used to see exactly what is returned by a web server that can be useful for debugging problems - it is free and can be downloaded from http://www.cyberspyder.com/webbug.html
 
Upvote 0

Gregg Homan

Member
Licensed User
Longtime User
TomA,

I do suspect that a redirect of some sort is causing the blank screen problem for mobi.match.com redirects to http://mobi.match.com/login when normally browsing with my cell phone. It is noteworthy that WebView1.LoadUrl("http://mobi.match.com") works fine on the web browser on my Droid Maxx. I am considering created a post to report a potential bug within WebView given that WebView seems unable to follow the match.com redirect but I wanted to check with this forum for their feedback before I do.

Gregg
P.S. qsrtech, very funny;)

B4X:
WebView1.LoadUrl("http://www.match.com") 'causes WebView to hang and display a blank blue screen
WebView1.LoadUrl("http://mobi.match.com") 'causes WebView to hang and display a blank blue screen
WebView1.LoadUrl("http://www.match.com/login") 'Work like one would expect WebView to
WebView1.LoadUrl("http://mobi.match.com/login") 'causes WebView to hang and display a blank blue screen
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I installed your app on a Galaxy tab2 using v3.00 and on another off brand tablet. It works just fine. When I scroll the site I see everything.
B4X:
Sub Globals
    Dim WebView1 As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("layoutMain")
    WebView1.LoadUrl("http://mobi.match.com")
End Sub
 
Upvote 0

Gregg Homan

Member
Licensed User
Longtime User
Thanks Mahares,

Hmmmm, that's interesting, is just my Droid Maxx/Android V4.4/B4A V3.20 having this problem? ... I will try to commandeer a couple family and friends' phones to see if other phones work or fail using this test code that specifically loads http://mobi.match.com and report back in a few days ... In the meantime, if anyone else in this forum cares report back test results that includes phone model, android version, and B4A version it will be appreciated.

Gregg
 
Upvote 0

qsrtech

Active Member
Licensed User
Longtime User
Thanks Mahares,

Hmmmm, that's interesting, is just my Droid Maxx/Android V4.4/B4A V3.20 having this problem? ... I will try to commandeer a couple family and friends' phones to see if other phones work or fail using this test code that specifically loads http://mobi.match.com and report back in a few days ... In the meantime, if anyone else in this forum cares report back test results that includes phone model, android version, and B4A version it will be appreciated.

Gregg

Sorry no go on b4a 3.2, galaxy note 2 phone. Like I said, the developer(s) wife made him disable it to protect all her comrades. :p
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I had the same problem you did on a Droid Razr (not maxx). However, when I changed to this line, I was able to get in the site:
B4X:
WebView1.LoadUrl("http://www.match.com/home/myhome.aspx")
By the way I have no interest in going to that web site. if the wife finds out, she may slice it off. You know what what I am talking about.
 
Upvote 0
Top