I am new to android and backend development and came in a problem today. I have setup rails server on my computer and localhost:3000 shows ruby page. My android device (connected by usb) main activity has a webview and I tried localhost:3000
Instructions if you're on a Mac. Other OS's, do something comparable.
Connect your computer and Android tablet to the same Wifi connection.
Open System Preferences.
Go to the Network section.
Click on your Wifi connection and copy your IP address from that window:
Make sure your Rails server is running on port 3000.
On your tablet, point to your computer IP address with port 3000,
192.168.0.14:3000
Hope that helps!
/ JP
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With