I'm having an annoying issue with Android development. I have a webserver (Tomcat) running on my Macbook which is connected to the local network via wifi. I have my Sprint EVO connected to the same network using wifi. The only way I can connect to the Tomcat instance is by raw IP address. If I use the Macbook name with or without the ".local" domain suffix it does not recognize the host name. The emulator behaves the same way. My iPhone can resolve the host name as can the iPhone simulator. So, I'm thinking either this is a bug in the Android platform or I've missed/accidentally tweak some hidden config somewhere in both the emulator and the device? Any idea?
+2
A:
A .local
domain suggests Bonjour, which Android doesn't speak natively. The Mac's name without '.local' is either an AFP name or a WINS name (if you've got samba turned on), which isn't going to help much either.
You'll need to set up a proper DNS server (maybe your wifi router will do it), or try one of the java zeroconf libraries as described here.
Seth
2010-10-16 18:11:11