Yasmine GreenApple
Yasmine GreenApple

Reputation: 448

Getting android device galaxy S2 work like an emulator

I want to test my app on a android device, I have a local webservice (ASP.net) that is hosted in my laptop in local, when I plug my device, the app works in it but it cannot receive data from my local webservice, how can I get the data sent to the device just like in the emulator PS: the app works properly in the emulator. thank you

Upvotes: 0

Views: 414

Answers (1)

Marcin Gil
Marcin Gil

Reputation: 69505

The emulator uses your laptop's network interfaces, hence it can access webservice directly. Your device needs to connect to your laptop via its own connectivity options (celluar network, WiFi, possibly bluetooth).

I have a few ideas how to get there:

  • If you have got a WiFi router and both your laptop and phone connect to it - that's pretty straightforward: just expose webservice to address that can be seen within network and use it on your phone.
  • If you've got an external IP - just use that address when phone is connected to network.
  • Set up a WiFi access point on your laptop and connect your device with it

    Check these URLs how to set up a hosted network (hotspot) on Windows 7:

    Hosted network documentation in MSDN

    Hosted network tutorial

  • You might try Bluetooth and PAN.

Upvotes: 2

Related Questions