I'm using Xamarin/Mono for Android.
I'm trying to connect to a web service running on my dev machine from my android device which I'm debugging via USB using the loopback address with 10.0.2.2:
It seems that I'm not even able to ping the IP address...
var reply = ping.Send("10.0.2.2");
This is telling me the Time To Live has expired.
My Firewall is off, and I've added a rule to allow all connections for all ports and still it won't connect, so I'm all out of ideas....
10.0.2.2 only works with the emulator.
For actual devices you can e.g. use your internal network address, provided that your computer and device are on the same network. For example, if the computer running your web service has IP 192.168.1.100 (use ifconfig/ipconfig to find out), use that as the address.
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