Can javascript get the SSID of the current WiFi connection?

前端 未结 2 1627
暖寄归人
暖寄归人 2021-01-19 01:37

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.org/TR/system-info-api/#n

相关标签:
2条回答
  • 2021-01-19 02:30

    Poodimizer is right. If you need iOS support, I forked WifiWizard. See: https://github.com/makeroo/WifiWizard

    Although only getCurrentSSID is supported due to Apple limitations.

    0 讨论(0)
  • 2021-01-19 02:32

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

    There is currently one available from HondaDai under the MIT license located at https://github.com/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.

    0 讨论(0)
提交回复
热议问题