-2

I have made an app using Android Studio, and I managed to retrieve data from WAMP in my emulator (using JSON parsing), but when I run the same app on my current physical device, the data does not appear even when I connect my laptop and my cell phone with USB, and also I've tried using the WiFi Hotspot from my cell phone.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Mohendra
  • 161
  • 1
  • 7

1 Answers1

-1

data does not appear even when I connect my laptop and my cell phone with USB

WAMP is a web server, it does not transfer data over USB

I managed to retrieve data from Wamp in my emulator

That's good. You probably used an IP address of 10.0.2.2 to connect.

You can't use that address outside of the emulator on a physical device, though. You have to use the LAN IP address of the computer running WAMP. And you additionally need to check that WAMP is externally accesible by other devices in the network. (I'm not sure if that is the default configuration, or not).

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245