Some of the pages can't open in WebView.

  • Replies:4
  • OpenNot stickiedUnanswered
  • Forum posts: 3

Oct 4, 2011 4:15:14 PM via Website

Hi, I'm new to Android and trying to open websites from a ListView.
Some pages are working fine but some are not opened! The same url is working fine in a regular web browser.

Error Msg: Web Page not available
The web page at might be temporarily down or it may have moved permanently to a new web address.

Here are some suggestions:
1 - Check signal and data connection
2 - Reload this page later
3 - View a cached copy of the web page from Google
Please let me know what I am doing wrong. Thanks for your time !

/** Called when the activity is first created. */
public void onCreate(Bundle bundle) {
Bundle extras = getIntent().getExtras();
if (extras == null) {
pageLink = extras.getString("pageLink");
if (pageLink != null) {
WebView web = (WebView) findViewById(;
web.setWebViewClient(new localWebViewClient());
//web.getSettings().setUserAgentString("silly_to_do_this"); --- do I need to set this ?

private class localWebViewClient extends WebViewClient {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return true;

=== displayview.xml ===

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=""
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent" android:background="@color/pageBackGroundColor">

<WebView android:id="@+id/webview"
android:layout_height="fill_parent" android:background="@color/pageBackGroundColor"

Please guide me how to make it workable or an alernate to open web-sites with out the WebView. Thanks !

— modified on Oct 5, 2011 4:51:51 PM

  • Forum posts: 3

Oct 4, 2011 5:28:35 PM via Website

Hi Steve, please move it. Thanks
  • Forum posts: 3

Oct 7, 2011 7:09:49 AM via Website

I tried as you suggested but it did'nt work either (Error Msg: App stopped unexpectedly) !