I just wanted to ask how to connect to the localhost when the app is installed in mobile? I tried installing the apk of the android app in my mobile phone instead of the emulator of android studio. My app has a login and register activity. In the emulator, I'm able to register and login while I cannot register and login using my phone. Thanks in advance for the answer!
There are a lot of answers exist, but in simple follow the steps below.
ipconfig
in command prompt if you are using a pc). Place this ip as your base url in your app and use register/login endpoints as per your need.
For eg: http://your.ip.here/register.php like this > ( http://192.168.0.2/register.php )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.