[英]Send(Beam) WiFi Configuration via NFC to another NFC capable device(Android)
I am creating a Android App that does a bunch of stuff. 我正在创建一个做很多事情的Android应用程序。 One of the capability of the App is to be able to transfer "Current Wifi Configuration" to another device. 该应用程序的功能之一是能够将“当前Wifi配置”传输到另一台设备。 Is there any predefined format(something like a MIME type) to store Wifi config. 是否有任何预定义的格式(如MIME类型)来存储Wifi配置。
Also, is it possible to write the Wifi Configuration in to a NFC tag. 另外,是否可以将Wifi配置写入NFC标签。 Is there a predefined record structure for this. 为此有一个预定义的记录结构。 Later is it possible to scan the tag and load the Wifi Config in to another device ? 以后是否可以扫描标签并将Wifi配置加载到另一台设备?
Yes, with the right permissions you can fetch the configuration ( http://developer.android.com/reference/android/net/wifi/WifiConfiguration.html ): you'd probably need to compress it somehow before you serialize it and then write it into an NFC tag. 是的,有了正确的权限,您可以获取配置( http://developer.android.com/reference/android/net/wifi/WifiConfiguration.html ):您可能需要先对其进行压缩,然后再进行序列化,然后将其写入NFC标签。 On the other device you'd read it, decompress/deserialize and then create a new WifiConfiguration to add to the other device. 在您要阅读的另一台设备上,解压缩/反序列化,然后创建一个新的WifiConfiguration以添加到另一台设备。 WifiManager has the methods you need to create/update the configuration. WifiManager具有创建/更新配置所需的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.