admin管理员组

文章数量:1287577

I need to get the SSID of the currently connected WiFi Network (if it is wifi). Is this possible?

I saw something on it here (), but I can't seem to get the code to run. Is there a library I need to import or is this just planned implementations?

I'm writing a phonegap application and need to know whether I should connect to a server locally or if I need to go remotely.

Thanks

I need to get the SSID of the currently connected WiFi Network (if it is wifi). Is this possible?

I saw something on it here (http://www.w3/TR/system-info-api/#network), but I can't seem to get the code to run. Is there a library I need to import or is this just planned implementations?

I'm writing a phonegap application and need to know whether I should connect to a server locally or if I need to go remotely.

Thanks

Share Improve this question asked Jul 19, 2013 at 15:42 PoodimizerPoodimizer 6211 gold badge7 silver badges18 bronze badges 4
  • It's a working draft - the very first stage of the W3C process. I don't know whether anyone has implemented any of it. – sabof Commented Jul 19, 2013 at 15:46
  • in terms of popular browsers alone, no, not possible. Perhaps cordova tunnels an OS API, but i've not seen anything like that. You can get connection info in some browsers, but that only indicates [off, paid, and wide], not connection specifics. – dandavis Commented Jul 19, 2013 at 17:37
  • So my only option here is to either build a plug-in for it or to find one that is already built. Does anyone know of one that might be able to do this? – Poodimizer Commented Jul 19, 2013 at 17:43
  • I found one for Android under the MIT license if anyone is interested: github./HondaDai/PhoneGap-WifiInfoPlugin. Thanks HondaDai. – Poodimizer Commented Jul 19, 2013 at 18:16
Add a ment  | 

1 Answer 1

Reset to default 5

It is not possible as of this time. However PhoneGap does let you build plug-ins that will acplish this task.

There is currently one available from HondaDai under the MIT license located at https://github./HondaDai/PhoneGap-WifiInfoPlugin.

** and it works beautifully. After I figured out how it works. His example on how to get the SSID that shows wifi.SSID as a variable is incorrect. It is actually wifi.activity.SSID as there are two JSON objects in the return and I wanted to access the one title activity.

本文标签: browserCan javascript get the SSID of the current WiFi connectionStack Overflow