1

I have 4.2 version. I developed application which implements a webserver on the device. so If I want to connect to the device all I need to do is address its ip: http://192.168.10.x:8080. I want to replace the IP with a predefined host name, just like 'computer name' in windows: http://android_device:8080.

I found that I need to use Netbios, but I dont know how to activate a service like that.

Is it possible? I dont mind rooting the device.

thanks! Asaf

Asaf
  • 11
  • 1
  • 1
    I suppose a dynamic DNS updater can help. See https://play.google.com/store/search?q=dyn+dns – Firelord Aug 24 '15 at 08:44
  • If you have an answer, I'd appreciate it at https://android.stackexchange.com/q/230644/22600 Thanks! – Ryan Oct 29 '20 at 19:04

1 Answers1

1

That's not an Android specific question, but rather general networking stuff. You need something to resolve the name. As the IP you've named points to a "local network", and if you want to connect from a single computer only, the easiest way to achieve this is making use of the Hosts file of your computer's OS. On Linux this is /etc/hosts, where you can simply add a line like this:

192.168.10.15 android_device

That's it. Syntax is the same on other OS's, just the location of the file might differ: see this section of the linked Wikipedia page for details.

Izzy
  • 91,166
  • 73
  • 343
  • 943