Access IIS site from android - android

I am using Windows 8 Pro x64. When I try to connect to my laptop with the Android 4.1 tablet of my parents, I just get Hostname could not be resolved.
I found that it works with the IP address, but I need the hostname. Reasons for this are ajax calls and https. Any idea how I can get it work?

Related

How do I resolve a hostname from an IP address on Android on a LAN?

I was able to do this on iOS using system apis, but not android.
Using InetAddress.getHostName() doesn't work for LAN addresses (only remote addresses).
I'm not above writing very low level UDP or TCP code or invoking command line tools. Most of the tools I'd use on linux or mac are not available via the CLI on android.
Any suggestions? I cannot find documentation for this at all.

How to connect to localhost from VS Android Emulator

I am attempting to connect to the localhost of the machine from which I am booting a VS Android Emulator. I am able to successfully connect to the IIS Server when the Android version is Kitkat. However, I fail to connect when the VS Android Version is Lollipop or Marshmallow. The way I am connecting to the localhost is typing http://169.254.80.80 in the browser of the Emulator. As per http://developer.android.com/tools/devices/emulator.html#networkaddresses I should be able to connect to localhost using the IP address 10.0.2.2. However, this IP address doesn't seem to work for me.
VS studio Emulator work very fine and fast
see the screen shot that how you can connect VS Emulator to localhoat
The network addresses specified on http://developer.android.com/tools/devices/emulator.html#networkaddresses will not work for the Visual Studio Emulator for Android (well, except the very last one, which is the standard localhost IP address).
The address 169.254.80.80 is expected to work as a loopback to the host. There seems to be a bug regarding connectivity back to the host using that address on images running Lollipop (21) and above. I have logged a bug internally for this.
The previous answer is perfect but Android studio 3+ emulator need to add IP and port on proxy under setting.

Genymotion access to local web server

I have installed Genymotion 2.2 with Android 4.1 guest OS. Also, I have Apache running on host OS with several local sites.
Is it possible to get each local site from the guest's Android browser?
I tried to do this with ProxyDroid app, but it didn't work for me.
Yes, you can. As you can see in the image below, I am connecting to my Tomcat server running on my laptop via the browser in Genymotion machine. Notice that I have used my IP address to connect to Tomcat:

My application works on android emulator but don't work in android device

I made a web service in .Net Framework 3.5 in Microsoft Visual Studio 2008 and called it from android. I used Sql Server as a database.
When I am running my application in the android emulator, it will run fine but if I install it onto my android device, then it will throw a java.socket.SocketTimeOutException.
Is your server running on your desktop from Visual Studio? If so, you cant connect to it from any machine but that particular desktop unless you forward ports or use a proxy server (also on the same machine).
I got the solution. Please take care that your computer Firewall is off when you use IIS as virtual server on your local pc. If you turn off your firewall protection then it will be allowed you to access the web methods but if firewall is on then you get java.net.SocketTimeOutException

DNS Problem with Android Emulator

I cannot use the browser and internet connection in my android app with android simulator.
When I try to open a homepage using the native webbrowser in the emulator, but when I use the ip address, it opens just fine.
How can I fix DNS problems in the android Emulator.
I already turned off the Windows Firewall, but it didn't work.
Data: Windows 7 x64 / Eclipse Plugin for Android / Android version 2.1
Do you have multiple NICs on your machine? The emulator might be trying to use a DNS that it cannot access (i.e. going through the wired DNS server if wired is disconnected). You can check which DNS server is being used by starting the emulator with the -debug-slirp flag.
See here for more info.

Categories

Resources