javascript可以获取当前WiFi连接的SSID吗? [英] Can javascript get the SSID of the current WiFi connection?

查看:688
本文介绍了javascript可以获取当前WiFi连接的SSID吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要获取当前连接的WiFi网络的SSID(如果是wifi).这可能吗?

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

我在这里看到了一些东西( http://www.w3. org/TR/system-info-api/#network ),但我似乎无法运行代码.我需要导入一个库吗?或者这只是计划的实现?

I saw something on it here (http://www.w3.org/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?

我正在编写一个phonegap应用程序,需要知道我应该本地连接到服务器还是需要远程访问.

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.

谢谢

推荐答案

目前无法执行.但是PhoneGap确实允许您构建完成此任务的插件.

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

根据MIT许可证,本田汽车公司目前有一款产品位于 https://github.com/HondaDai /PhoneGap-WifiInfoPlugin .

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

**,效果很好.在我弄清楚它是如何工作的之后.他关于如何获取将wifi.SSID显示为变量的SSID的示例是错误的.实际上是wifi.activity.SSID,因为返回中有两个JSON对象,我想访问一个标题活动.

** 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.

这篇关于javascript可以获取当前WiFi连接的SSID吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆