Skip to main content

How to access PC's internet from Android Emulator?

PC's Internet and Android emulator

If PC's Internet connection is configured with manual proxy settings, Follow the below steps.

1) You can launch your Emulator from command line with DNS server detail.
 Syntax : "emulator -dns-server <DNS Server IP address>"
 Example: emulator -dns-server ( is Google's Public DNS Server)
  Goto Eclipse->Window->Preferences->Android->Launch and give "-dns-server " and then launch your emulator.

2) In emulator goto "Settings->Wireless & Networks->Mobile Networks->"
      2.1) Ensure that "Data roaming" is checked.
      2.2) Select Access Point Names
      2.3) Select an APN. (eg. Telkila )
      2.4) Manually set the Proxy Server and Port details.

If PC's Internet connection is configured with Automatic proxy settings, Follow above steps except step 2.4  and ensure that No proxy server detail or port detail is mentioned for the selected APN.

You are done. Launch browser or Google Maps and test the internet connectivity before testing it from your application.

Code ! Code ! Code!


Anonymous said…
Thanks! After a lot of searching, this is what did it in my specific scenario. I'm using a VMWare machine, so disabling all my NIC's will not work.
anonymous said…
where to set -dns-server in launch?
also emulator is not recognizable command inn command to set -dns-server ??
Katturaja said…
To launch from command line,
Go to command prompt
go to \tools

then type "emulator -dns-server

Example: emulator -dns-server


To launch from Eclipse.

Go to Window Menu, Select Preferences then select Android and select launch under Android
then type "-dns-server "
September 14, 2011 9:52 AM
Ramiz said…
After hours of searching, this worked for me. Thanks.
Abhay said…
Thanks .. worked for me after I used the proxy server ip address instead of server name
qyw said…
thanks for solution. but I try it and the internet still can not be accessed. is there any thing I should try? thanks alot.
vijay said…
thanks a ton ... the last one really worked
Ravindra said…
Thanks a lot.. its worked for me...

Popular posts from this blog

Tabs at the bottom of TabActivity

Tabs at the bottom of TabActivity
By default tabs in Android are displayed at the top. It is a general guideline for android developers to keep the tabs at top of the Tabs based application since lot of Android mobiles are having their home, back,search buttons or touch interface at the bottom

But its purely our decision :)

There are two ways to achieve this.
Using RelativeLayout Using "android:layout_weight" attibute  1) Using RelativeLayout: .xml will look like the following.
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android=""
        <FrameLayout android:id="@android:id/tabcontent"

Why a gaming startup? FirstSeed!

I write occasionally. This time I would like to share about why I started game development studio FirstSeed.

Many of you might wonder why this guy chose this field? I would like to add reasons for selecting game development as my core business. During my school days, I played "9999999 in 1" handheld console games. It was interesting those days. Later got an opportunity to play TV Console game. I got to play games like Mario, Contra, BaseBall, Bomberman. I loved these games to the core. This was the first time I felt so much connected to something. I got a feel of myself jumping there. Whenever I pressed Jump button, together with Mario me too jumped a little bit. So I was always finding excuses to play games.

During my higher secondary education, got into PC games and played Need for Speed, Road Rash, EA Cricket. These games entertained me very well. But Age of Empires II and Red Alert 2 are no more just games during that time. They were life during those days. Actually, we…

Me and FirstSeed so far....

FirstSeed is more than two and half years old now. Released three games to Google Play Store. I have a team of good individuals working with me. They are doing quite good in their jobs. Running a game studio is not a joke. But, we enjoy doing it.

How much money I have made so far? 🤣 .  We are still learning many areas of game making and releasing.

How much money I have invested? $$$. Without my father's support, my wife's support and my friends' support it is not possible to run a startup without making much money.

We earlier focussed on mobile game development alone. Now, We have brought PC games too under our focus. We are building our next PC Game "Quest of Vidhuraa". Will be released by end of 2017.

And we are having a mobile game "To My Home" to be released soon. "To My Home" is a mix of everything. A thrill and exposure to the team. So many reschedules it has met for the past two years. "YET TO BE LAUNCHED"

We are yet to meet…