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 ?
Please can anyone help me here ?
This is my code :
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(" ");
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en