Back to Top

How to connect android emulator to the internet?

Solution:Internet connection issue on AndroidEmulator

Yesterday i have started Phonegap series post and In this second part of our PhoneGap tutorial series, I am going to explain about how to call web service in PhoneGap android application.

Recently I was working on web service for an Android application and I have written ajax code and the web service is running on localhost using the Android emulator but getting below issue.

Read about: Getting Started With PhoneGap

Problem:

If I execute my web service into chrome advanced rest client, It’s working perfect and gives a proper response with data. But when I am going to execute using jQuery ajax method into my android application using PhoneGap, it’s not going into success or error means it’s not giving error or success result.

Solution:

The problem was simple and I have spent more than an hour to find solution so I have checked with java developer and got that my application was not connected to access the internet from the Android Emulator and web service is using remote URL and to access internet,need to write code into AndroidManifest.xml file.

Must Read: Display Text Format Proper in IPHONE+ANDROID

After all installation of your project or setup of your project,if your webservice not called.Open your AndroidManifest.xml and place below code:

That’s it. Run your web service in Android!. I hope that you’ve found this tutorial useful.

Suggested Reading

As always, thanks for reading. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Comments (1)

  1. […] series post of Phonegap,I have explained basic about phonegap and Internet connection issue in Android so Today I am going […]

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

How to use _remap function Codeigniter

Posted on 12 years ago

Bhumi