Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6639349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:32:38+00:00 2026-05-25T23:32:38+00:00

I (like many others) followed the webview tutorial, but I can’t get pages to

  • 0

I (like many others) followed the webview tutorial, but I can’t get pages to load. Everything comes up as ‘Webpage not Available’

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.

I have read that the biggest issue is people not putting the INTERNET 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?

Here is my code:

Manifest:

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".AndroidTestActivity"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <uses-permission android:name="android.permission.INTERNET" />
    </activity>     
</application>
</manifest>

AndroidTestActivity

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) && 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;
            }
        }
}

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:32:39+00:00Added an answer on May 25, 2026 at 11:32 pm

    Your internet permission should be an immediate child of “manifest” – shouldn’t be under “application”.

    e.g.

    <manifest 
        xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.mypackage.name"
        android:installLocation="auto"
        android:versionCode="3210" android:versionName="1.1.0"> 
    
        <uses-permission android:name="android.permission.INTERNET" />
    
        <uses-sdk android:minSdkVersion="6" android:targetSdkVersion="10"/>
    
        <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
    
        <!-- activities go here -->
    
        </application>
    </manifest>
    

    Hope this helps
    -serkan

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This sounds like a problem many others have posted about, but there's a nuance
Like many others on this site I am considering a move to ASP.NET MVC
I, like many others, love Eclipse as my ide of choice, and because of
I am creating dynamic TextFields in actionscript 3.0. Like many others, my text disappears
I'm trying to make a little client-server script like many others that I've done
Yet again another issue with resizing, like many others I have used the CreateParams
I tried many different methods but can't seem to work this one out. I
Like many others, I'm new to Rails and have a question. I'm working on
Like many others, I am trying to draw 3D objects (using GLSurfaceView) on camera
So, like many others I decided to create my own speech-recognition engine. As it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.