i wanna get IP address. Using that Ip address must detect overall devices which is connected to a specific network/device.And should be able to get MAC address ?
tv=(TextView)findViewById(R.id.tv);
wifi=(WifiManager)getSystemService(WIFI_SERVICE) ;
btn=(Button)findViewById(R.id.btn);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
InetAddress inet=InetAddress.getLocalHost();
Toast.makeText(getApplicationContext(),inet.toString(),Toast.LENGTH_LONG).show();
} catch (Exception e) {
System.out.println(" ");
}