-1

I'm trying to communicate with a local API server, but found out Android devices are not able to communicate with local domains. I've been up all night looking for ways, but came with nothing. I found the jmdns packages, but don't know how to include it in my cordova/ionic app. Currently i am trying a Cordova plugin (diont), but am a little lost ;-) Does anybody here know of good working sollutions?

I am building a device for use in a local network, so i have to figure this out :-)

Thanks!

bartpeperkamp
  • 49
  • 1
  • 14

1 Answers1

0

Bad news, this is a well known Android bug/missing feature.

https://code.google.com/p/android/issues/detail?id=8030

If you really need to make this work, the only "solution" i can think of is to do a DNS lookup yourself, since you are using Cordova, you'll probably need to write a plugin to do that.

  • I read that, it sucks that such an old bug is still there (even in Android 5.0) With the coming of the internet of things this is a really stupid mistake to make (from Google/Android team) I'm looking for a solution, there has to be a way to get a server ip via a javascript solution. If i find anything i'll post it here. It can be useful for others :-) – bartpeperkamp Jan 09 '15 at 13:53
  • http://stackoverflow.com/questions/7113072/resolve-a-hostname-with-javascript Basically, you should use java and cordova plugins – Riccardo Cagnasso Jan 09 '15 at 15:22
  • You are right, i have to incorporate the Diont Cordova module. if i get that working i'll post the result here :-) – bartpeperkamp Jan 12 '15 at 17:11