Android Scan Local Subnet?

The emulator is not on the same subnet as your computer. It's on it's own virtual subnet connected to the computer via its own NAT router. There is an explanation here: developer.android.com/guide/developing/d... However, the emulator, via its router, should be able to connect to any socket anywhere on the Internet.

What is the address you are trying to connect to? The emulator won't route 10.0.0.0 private addresses because it uses them for itself. Not sure about 168.192.0.0.

Can you post the code that is failing?

Thanks for the reply. I'm attempting to connect to machines that are on the 10.115.23. * range.

– David Feb 24 at 16:20 Well that's why private addresses behind NAT suck and it would be better to use public addresses for every machine. You've got two networks both using the same address space. Suggestions: 1.

Renumber your network to use a different subnet. 2. Debug on a real device - it's not much more difficult than using the emulator, and often better – Richard Feb 24 at 16:32 I can't.

Our network is set up to use the 10.115.23 range, and I have no physical device to test on at the moment. I am attempting to connect via socket to the local machine of 10.0.2.2 now and I can't! Something is wrong.. – David Feb 24 at 16:40 What error do you get?

If you open up the adb shell and try to ping the known host, what happens? – Chris Stratton Feb 24 at 18:25 No errors. Just nothing happens.It's quite annoying.. And I don't know anything about the adb shell, what is it?

– David Feb 24 at 20:55.

I'm currently writing a small test Android app, and have run across a small (large) problem with the emulator. The code that goes out and scans the local subnet for computers running my server piece of the software does not return anything! This code functions perfectly on the desktop portion, so I know something is wrong inside of my emulator.

I had to hardcode the IP scan first because I cannot determine the IP address within the emulator, so I know I'm at least scanning the right range. Summary: How can I connect to servers via sockets from inside my emulator on the local subnet?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions