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 8730507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:02:20+00:00 2026-06-13T09:02:20+00:00

I create an android application that the program should connect to the internet and

  • 0

I create an android application that the program should connect to the internet and when i pressed Go button, the program should to open the webView page(google.com). My program can’t connect to the internet and i don’t know why? I add log.i() function to the program that when i clicked button, i see this.

Go.java

package org.example.test;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.view.View.OnClickListener;

public class MainActivity extends Activity{
private WebView webView;
private Button go_button;

@Override
public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    Log.i(UI_MODE_SERVICE, "HELOOOOOOOOOOOOOOOOOO");
    setContentView(R.layout.activity_main);
    webView=(WebView) findViewById(R.id.web_view);
    go_button=(Button) findViewById(R.id.go_button);
    go_button.setOnClickListener(new OnClickListener(){
        public void onClick(View view){
            Log.i(UI_MODE_SERVICE, "STARRRRRRRRRRRRRRT");
            webView.loadUrl("http://www.google.com");
            Log.i(UI_MODE_SERVICE, "BYEEEEEEEEEEEEEEEEEEEEE");
        }
    });
}
 }

MainActivity:

package org.example.test;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
       getMenuInflater().inflate(R.menu.activity_main, menu);
       return true;
    }
}

Activity_Main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <WebView
         android:id="@+id/web_view"
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_weight="1.0" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="bottom"
        android:orientation="horizontal" >

        <Button
            android:id="@+id/go_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/go_button"/>
      </LinearLayout>
  </LinearLayout>

strings.xml

<resources>

    <string name="app_name">test</string>
    <string name="hello_world">Hello world!</string>
    <string name="menu_settings">Settings</string>
    <string name="title_activity_main">MainActivity</string>

    <string name="go_button">GO</string>

 </resources>

androidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.example.test"
    android:versionCode="1"
    android:versionName="1.0" >
<uses-sdk
    android:minSdkVersion="9"
    android:targetSdkVersion="15" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
 </application>

</manifest>

LogCat:

10-24 22:04:50.674: DEBUG/AndroidRuntime(30445): >>>>>> AndroidRuntime START  com.android.internal.os.RuntimeInit <<<<<<
10-24 22:04:50.674: DEBUG/AndroidRuntime(30445): CheckJNI is OFF
10-24 22:04:50.854: DEBUG/AndroidRuntime(30445): Calling main entry com.android.commands.pm.Pm
10-24 22:04:50.870: DEBUG/AndroidRuntime(30445): Shutting down VM
10-24 22:04:50.870: INFO/AndroidRuntime(30445): NOTE: attach of thread 'Binder Thread #3' failed
10-24 22:04:50.877: DEBUG/dalvikvm(30445): GC_CONCURRENT freed 101K, 89% free 463K/4096K, paused 0ms+1ms
10-24 22:04:50.885: DEBUG/jdwp(30445): Got wake-up signal, bailing out of select
10-24 22:04:50.885: DEBUG/dalvikvm(30445): Debugger has detached; object registry had 1 entries
10-24 22:04:51.213: DEBUG/AndroidRuntime(30458): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
10-24 22:04:51.213: DEBUG/AndroidRuntime(30458): CheckJNI is OFF
10-24 22:04:51.393: DEBUG/AndroidRuntime(30458): Calling main entry com.android.commands.am.Am
10-24 22:04:51.393: INFO/ActivityManager(178): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=org.example.test/.MainActivity} from pid 30458
10-24 22:04:51.495: DEBUG/AndroidRuntime(30458): Shutting down VM
10-24 22:04:51.510: DEBUG/dalvikvm(30469): Late-enabling CheckJNI
10-24 22:04:51.510: INFO/ActivityManager(178): Start proc org.example.test for activity org.example.test/.MainActivity: pid=30469 uid=10111 gids={}
10-24 22:04:51.518: DEBUG/dalvikvm(30458): GC_CONCURRENT freed 102K, 89% free 484K/4096K, paused 1ms+0ms
10-24 22:04:51.518: DEBUG/dalvikvm(30458): Debugger has detached; object registry had 1 entries
10-24 22:04:51.518: INFO/AndroidRuntime(30458): NOTE: attach of thread 'Binder Thread #3' failed
10-24 22:04:51.526: INFO/WindowManager(178): createSurface Window{41cc2288 Starting org.example.test paused=false}: DRAW NOW PENDING
10-24 22:04:51.573: DEBUG/OpenGLRenderer(438): Flushing caches (mode 1)
10-24 22:04:51.580: INFO/uimode(30469): HELOOOOOOOOOOOOOOOOOO
10-24 22:04:51.635: DEBUG/OpenGLRenderer(438): Flushing caches (mode 0)
10-24 22:04:51.666: INFO/WindowManager(178): createSurface Window{41cc2e48 org.example.test/org.example.test.MainActivity paused=false}: DRAW NOW PENDING
10-24 22:04:51.690: DEBUG/libEGL(30469): loaded /system/lib/egl/libGLES_android.so
10-24 22:04:51.698: DEBUG/libEGL(30469): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
10-24 22:04:51.698: DEBUG/libEGL(30469): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
10-24 22:04:51.705: DEBUG/libEGL(30469): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
10-24 22:04:51.854: DEBUG/OpenGLRenderer(30469): Enabling debug mode 0
10-24 22:04:52.260: INFO/ActivityManager(178): Displayed org.example.test/.MainActivity: +767ms
10-24 22:05:00.276: INFO/uimode(30469): STARRRRRRRRRRRRRRT
10-24 22:05:00.276: INFO/uimode(30469): BYEEEEEEEEEEEEEEEEEEEEE
10-24 22:05:03.659: INFO/uimode(30469): STARRRRRRRRRRRRRRT
10-24 22:05:03.659: INFO/uimode(30469): BYEEEEEEEEEEEEEEEEEEEEE

Thanks for advise.
Cheers.

  • 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-06-13T09:02:21+00:00Added an answer on June 13, 2026 at 9:02 am

    1) Your stack traceback is illegible: I don’t see if there’s an error

    2) Thank you for including your AndroidManifest.xml. I don’t see “internet” permissions – you need it!

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

Sidebar

Related Questions

I want to create an Android application that is a client for an Internet
I want to create an Android application that show the sales report from SQL
I am currently trying to create an Android application that loops Audio from the
I want to create a android search application that can be used to search
I am trying to create a simple Android application that has a ActivityList of
I have an Android application that uses the Android database to create tables and
I'm creating an Android application that requires me to create a bitmap of the
I am using android java to create an application that uses the accelerometer, i
I want to create an application for Android that will be able to scan
I'm trying to create an application that can use the android as a fax

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.