Sunday, July 3, 2022

[FIXED] How do I run an Android app on a real device?

Issue

I'm working with a nodejs, mysql, Android stack.

I want to test my android app on real device and connected my laptop and mobile on same WIFI network and specified the IP address in URL as I'm using Volley library

url is: http://ipaddress:8080 8080 is nodejs server port

But when i run my android app it does not run on nodejs server.No request is processed on nodejs server though request is sent from android side

I have tried many links but none of them worked. Any help is appreciated


Solution

I have the answer to my question
I tried the following link and it worked for me
https://stackoverflow.com/a/17603378/8101634

what it states is.
1) Connecting android device through USB cable to laptop
2) Switching USB tethering on android device
3) Go to network and sharing center.
4) It will show you the device and click on it.
5) Click on details
6) Take the Ipv4 address from there and use it as URL in android app
7) Re-run your android application

It works


Answered By - primo
Answer Checked By - Willingham (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.