2011年5月19日 星期四

[Android] How to set hostname on Android device?

$ su
# setprop net.hostname whateveryouwant

Please restart wifi after set hostname.

You can use the following code to check if it works.
InetAddress addr = InetAddress.getByName("192.168.15.105"); // 192.168.15.105 is your device ip
Reference:

沒有留言:

張貼留言