简体   繁体   English

通过NFC发送(Beam)WiFi配置到另一个支持NFC的设备(Android)

[英]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.

相关问题 是否有可能在Android设备和另一个NFC设备之间使用Android Beam? - Is it possible to use Android Beam between an android device and another NFC device? Android设备所有者通过NFC WiFi类型参数 - Android Device Owner via NFC WiFi-type parameter 禁用Android Beam和NFC - Disable Android Beam and NFC NFC Android Beam - NFC Android Beam 是否可以通过Android安卓光束将NFC数据从一个Android设备传输到另一个设备? - Is it possible to transfer NFC data from one Android device to another device bypasing android beam? 使用Android光束的NFC可以在同一光束中发送和接收吗? - Can NFC using android beam send and receive in the same beam? NFC Android Wifi配对 - NFC Android Wifi Pairing 是否可以在没有“ Touch to Beam”屏幕的情况下将NFC数据从一个Android设备传输到另一设备? - Is it possible to transfer NFC data from one Android device to another without the 'Touch to Beam' screen? 是否可以在没有“触摸到光束”屏幕的情况下将NFC文件从一台Android设备传输到另一台? - Is it possible to transfer NFC files from one Android device to another without the 'Touch to Beam' screen? 在Android 5.0中通过NFC激活设备所有者期间无法连接Wifi - Unable to connect Wifi during Device Owner activation in Android 5.0 via NFC
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM