DEV Community

Cover image for Connecting Android Apps to localhost, Simplified

Connecting Android Apps to localhost, Simplified

Tushar Sadhwani on April 17, 2021

P.S. if you're in a hurry, find the correct solution here I was working on a full stack side project a few months ago, and I wanted to make API ...
Collapse
 
abdnezar profile image
Abd Nezar

amazing

Collapse
 
mohamed_wahid_4b35b1689ad profile image
Mohamed Wahid

Thank you

Collapse
 
janezk7 profile image
janezk7

Wow, great stuff! Trying looking for a similar solution for a while and ended up a public forwarding service like ngrok for a while, but that comes with its own limitations.

Collapse
 
msfjarvis profile image
Harsh Shandilya

Learned something new! Great post :)

Collapse
 
tusharsadhwani profile image
Tushar Sadhwani

you're welcome (;

Collapse
 
wireless90 profile image
wireless90

Nice i only knew about adb forward, but it makes a lot of sense to also have adb reverse.

Collapse
 
tusharsadhwani profile image
Tushar Sadhwani • Edited

Ikr, i got to know about adb reverse because I read about adb forward on some obscure stackoverflow answer, and I wondered if a reverse port forwarding also exists, so I blindly tried adb reverse. And it worked.

Collapse
 
andrewreeman profile image
Andrew Reeman

Great tip! Thanks

Collapse
 
tusharsadhwani profile image
Tushar Sadhwani

:D

Collapse
 
uuc110 profile image
Sourabh

Do you know anything like? connecting smartTV/androind using ADB, like so i can forward my local host web server to TV to see my live changes

Collapse
 
dhiraj_sable_8fbd808129dc profile image
Dhiraj Sable

Instead of this may try to use DHCP IP reservation featuron on your home Wi-Fi router so that IP will be same every time device connects toWI-Fi. I am using this feature for my RaspberryPi.