烘烤wifi扫描结果会出错

时间:2014-02-24 19:54:57

标签: android wifi android-wifi wifimanager

我需要将扫描结果作为吐司,但我认为在吐司的语法中有一个错误,但我无法解决它

wifis = new String[wifiScanList.size()];
for(int i = 0; i < wifiScanList.size(); i++){
wifis[i] = ((wifiScanList.get(i)).toString());

Context context = getApplicationContext();
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, wifis, duration);
toast.show();

该程序让我将wifis类型更改为CharSequence但我需要它作为字符串来获取有关每个wifi网络的信息..任何想法!

1 个答案:

答案 0 :(得分:0)

这可能对您有用:

  Toast toast = Toast.makeText(context, Arrays.toString(wifis), duration);