I worked on an app a couple of years ago and now I have to make enhancements to it. As it was my first (and only so far!) project so I had problem accessing web service on device as well as emulator at the beginning. However, I finally managed to run on emulator when I asked the following question on this forum:
Now the problem is that when I tried running the same code, it does not access
localhost through emulator. I never managed to run it on device even earlier and now too. I was using
10.0.2.2 for emulator. Here are the points on which I would like your help please:
1) Why am I not able to run the same exact code to get to
localhost? I can access the web service when I open it in my laptop's browser like http://localhost:16299/MainService/PerformAnAction?str1=test. As I already said the code is exactly the same, one difference is that I previously worked on Windows 7 and now it's Windows 8. Is there any setting to be modified? I tried applying few things which I found on the net but I either get
Request TimeOut or
Error: ConnectFailure (Connection timed out) ... I guess both basically tell time out.
2) I would really appreciate if you can guide me on how to access
localhost through an actual device because emulators are usually very slow. I once again tried running it on an actual device through the help of the internet but here again I get one of the two errors mentioned in the previous point.
3) Can you also suggest some faster and possibly lightweight emulators? Though I have 8GB RAM but AVD as well as Xamarin Android Player both take so much time (and often eventually crash) as if I'm trying to run them on a 2GB machine!