0

I am new to android development. I have a module where I need to connect to a webservice via an android application. I have the web services in my localhost.

My question is: How to access them from my android application?

Tutorials on web says how to access the live web services.

mickmackusa
  • 43,625
  • 12
  • 83
  • 136
user3516319
  • 17
  • 1
  • 8

2 Answers2

0
  • First, both your computer and android device need to be in the same network,
  • If you use windows, go to cmd and type ipconfig /all
  • Find your computer's ip address
  • Then you will be able to access your server's from its ip address.
  • You can also check your firewall configuration if steps above don't work
0

i have did this before ,first of all , if you need to connect your android application with php service at localhost.following thing need following thing

  1. Android Emulator on which application install
  2. For SERVER -- WAMP or XAMP Server install on Local machine on which you are testing .

now host your php service in the www folder (in case of WAMP) or in the htdocs folder( in case of XAMP).

Now how to communicate between web service and android : as describe below

Now you have Envoirnment set now all you have to do is to follow this tutorial it will definatly resolve your issue .
http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/

HarrY
  • 139
  • 10