WifiUtils icon indicating copy to clipboard operation
WifiUtils copied to clipboard

Is there anyway to get scan wifi result in other format?

Open suijunqiang opened this issue 5 years ago • 5 comments

Hello,

Is there anyway to get wifi scan result in other format? Currently your lib return a string but hard to parse into Json or other format, so it's not easy to show the results as ListView on the Android UI.

Thanks & Best Regards Sui 2019-09-02

suijunqiang avatar Sep 02 '19 02:09 suijunqiang

for more detail the scan results is "Parcelable" list.

suijunqiang avatar Sep 02 '19 03:09 suijunqiang

Scan results are returned in a List<ScanResult> Just like the normal Android WiFi scan. I don't see any spacial difficulty parsing those into JSON format. What other formats would you recommend?

ThanosFisherman avatar Sep 02 '19 07:09 ThanosFisherman

@ThanosFisherman First of all, thanks for sharing your amazing project & such quick response. I commandant to use JSON, would you please give me demo code in your example?

Thanks & Best Regards Sui

suijunqiang avatar Sep 02 '19 07:09 suijunqiang

Have a look at the README file here

ThanosFisherman avatar Sep 02 '19 07:09 ThanosFisherman

@ThanosFisherman Yep, I see you have demo in the section of Scanning for WiFi Networks, in fact it has been contained all information that what I need.. How ever, I need some items such as SSID/BSSID/Level and try to show them on the UI, and it seems hard to extract from ScanResult.

Thanks anyway. Sui

suijunqiang avatar Sep 02 '19 08:09 suijunqiang