Can't access my laptop's localhost through an Android app

android, django, django-rest-framework, localhost, python

Solution

Have you started the server like this?

python manage.py runserver 0.0.0.0:8000

Then, try to connect to 192.168.XXX.XXX:8000

Problem

So I did a research before posting this and the solutions I found didn't work, more precisely: -Connecting to my laptop's IPv4 `192.168.XXX.XXX` - didn't work -Conecting to `10.0.2.2` (plus the port) - didn't work I need to test an API i built using Django Rest framework so I can get the `json` it returns, but i cant access through an Android app i'm building (I'm testing with a real device, not an emulator). Internet permissions are set on Manifest and i can access remote websites normally. Just can't reach my laptop's localhost(they are in the same network) I'm pretty new to Android and Python and Django as well (used to built Django's Rest Framework API). EDIT: I use `localhost:8000/snippets.json` or smth like this to connect on my laptop. PS: I read something about XAMP server... do I need it in this case? Thanks in advance

Original source