View Single Post
  #15   Spotlight this post!  
Unread 04-29-2015, 10:54 AM
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 146
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Quote:
Originally Posted by raystubbs View Post
I have the app working good with a static IP, but when I try to use DHCP with InetAdress.getForName("roborio-2657.local") I get an UnknownHostException. If any of you Android developers knows what the problem is please help.

I used the same code in a desktop Java app and it worked perfectly.

The INTERNET permission is declared in my manifest.
I'm going to guess that InetAddress doesn't look at mdns on Android, so you'll have to take a look at this: http://developer.android.com/trainin...essly/nsd.html. If you've installed the NI update on Windows, it sets up an mdns responder. You need to look up by mdns as well.

Edit: taking a second look at that article, it doesn't appear to talk about mdns. Android does not appear to have an mdns responder, so you probably won't be able to get dynamic ips working.

Last edited by fsilberberg : 04-29-2015 at 10:58 AM.