ThanosFisherman / WifiUtils

Easily Connect to WiFi Networks
Apache License 2.0
734 stars 188 forks source link

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

Open suijunqiang opened 5 years ago

suijunqiang commented 5 years ago

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 commented 5 years ago

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

ThanosFisherman commented 5 years ago

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?

suijunqiang commented 5 years ago

@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

ThanosFisherman commented 5 years ago

Have a look at the README file here

suijunqiang commented 5 years ago

@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