This is my code. I used it in Android 2.3. From my code, i got Hardware/Mac
address of other wifi enabled devices. Now what i have to do is , i have to
find an Ip addresses of other Wifi enabled devices programmically by using
this Mac address. How should i get an Ip address from these Mac address.
Please can anyone help me here?
My Code :
registerReceiver(new BroadcastReceiver()
{
@Override
public void onReceive(Context c, Intent intent)
{
results = wifi.getScanResults();
size = results.size();
int i = 0;
str1 = new String[size];
for (ScanResult result : results)
{
str1[i] = result.BSSID + " " + result.level;
i++;
}
ArrayAdapter<String>adapter=new
ArrayAdapter<String>(getApplicationContext(),android.R.layout.simple_list_item_1,str1);
lv.setAdapter(adapter);
}
}, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
}
--
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