title: WebView - WebPage not available
body: <p>I (like many others) followed the webview tutorial, but I can't get pages to load.  Everything comes up as 'Webpage not Available'</p>
  
  <p>I have ensured that the emulator does have internet access, and just to rule out a problem with the emulator I tried installing it on my phone, which resulted in the same behavior.</p>
  
  <p>I have read that the biggest issue is people not putting the <code>INTERNET</code> permission in my manifest file, which I have tried putting as a child of different elements in the manifest to no avail.  Does anyone know why I can't get this to load?  </p>
  
  <p>Here is my code:</p>
  
  <p><code>Manifest:</code>
      
      
      </p>
  
  <pre><code>&lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
      &lt;activity android:name=".AndroidTestActivity"
                android:label="@string/app_name"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
          &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;/activity&gt;     
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p><code>AndroidTestActivity</code></p>
  
  <pre><code>public class AndroidTestActivity extends Activity {
      WebView webview;
          /** Called when the activity is first created. */
          @Override
          public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.main);
  
              webview = (WebView) findViewById(R.id.webview);
              webview.getSettings().setJavaScriptEnabled(true);
  
              webview.loadUrl("http://www.google.com/m");
  
              Intent intent = getIntent();
              // To get the action of the intent use
              System.out.println(intent.getAction());
              // We current open a hard-coded URL
              try {
                  webview.setWebViewClient(new AndroidTestClient());
  
              } catch (Exception e) {
                  e.printStackTrace();
              }
  
          }
  
          @Override
          public boolean onKeyDown(int keyCode, KeyEvent event) {
              if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; webview.canGoBack()) {
                  webview.goBack();
                  return true;
              }
              return super.onKeyDown(keyCode, event);
          }
  
          private class AndroidTestClient extends WebViewClient {
              @Override
              public boolean shouldOverrideUrlLoading(WebView view, String url) {
                  view.loadUrl(url);
                  return true;
              }
          }
  }
  </code></pre>
  
  <p>Thanks!</p>