use InetAddress to check local or internal IP
only use TCP socket when OS is Lollipop and rooted