Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Developer
Posts: 455
Registered: ‎03-04-2011
My Device: Paper cup

WebView fallback / behavior on 404

If there's a 404, WebView is constructing a phony page titled with the domain name of the failed URL, and listing advertisements there for products and services that are based on its interpretation of the domain name.

 

The problem is that it's returning "Succeeded" even though the real page was actually not found, and examining the URL of the WebView still shows the requested URL so that to the application, it looks like the real page was found.

 

Manually entering the URL in the browser does the same thing, and the URL still shows as what was typed, rather than the URL of whatever's showing, which is not the real page.

 

How can I detect the 404 and use a proper fallback?  i.e. get the WebView to tell me if it loaded the real URL, or not ?  If the user's off the 'net or the server's down, I need to display a page embedded in the app.

 

Thank you

 

New Member
Posts: 1
Registered: ‎10-29-2013
My Device: Q10 / Z10

Re: WebView fallback / behavior on 404

I encounter the same as your.

Does anyone have an idea?

 

Thanks for your help Smiley Happy

Haploid, make it mobile!
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: WebView fallback / behavior on 404

That sounds more like your DNS provider giving you their own ad-laden page rather than the correct NXDOMAIN response, which some DNS providers and ISPs will do.

 

Basically, it makes it impossible to tell if a domain exists or not. Thank your ISP for hijacking the DNS system.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker