3

I am new to web development and would like to get some help. I am making one android application which makes some REST calls to get and post some data. These rest calls will be made to my own server. Now for development purpose I dont have that server. How can I develop rest apis on local machine(localhost) and make it accessible to my Android app over wifi? So my question is how should I do development(setup) in which I can use my local machine and setup a server and use it with my android app.

I am not clear with the setup and what to do. Some pointers in right direction and I can google it to use as per my need.

Thanks

learner
  • 1,095
  • 2
  • 18
  • 41
  • The name 'localhost' or 127.0.0.1 on your android device (or emulator) refers to the device itself. Emulators have an address (e.g., 10.0.3.2 for Genymotion) that refers to the hosting server. If you want to test with emulator and actual device, you might want to use the hostname or IP address of your local machine (and whatever port your container is answering). – Rob Jan 06 '15 at 16:44
  • I have the same setup: I use [Django REST framework](http://www.django-rest-framework.org/) for the backend and an Android application as the client. When I start the backend via `python manage.py runserver` the API is served via `http://127.0.0.1:8000` on my notebook exclusively. Thus I want to access the API from the Android application through the current IP address of the notebook. Is this possible? – JJD Jan 15 '15 at 14:33
  • yes that will work. Thanks. – learner Jan 21 '15 at 11:46

0 Answers0