开发者

Convert List<ScanResults> to ArrayList<HashMap<String>>

I want to convert the Android WiFi scan results a List<ScanResults> to a List<? extends Map<String, ?>>

This is开发者_JAVA技巧 for use with the SimpleAdapter which I would like to use

I have tried converting scans to a String[] for each BSSID and SSID then adding them to an ArrayList with a loop, but was unable to do with without overriding each as I went.


I put the scan result into a hash map. Here is what I did.

List<ScanResult> results = wifiMgr.getScanResults();
rssiList = new HashMap<String, Integer>();

for (ScanResult result : results) {
    rssiList.put(result.BSSID, result.level);
}

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜