如何通过WiFi发送数据? [英] How send data through WiFi?

查看:219
本文介绍了如何通过WiFi发送数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,如果用户使用相同的WiFi连接而不使用TCP,我想通过WiFi将文件发送给多个用户.如何获取连接到指定Wifi的用户列表. 我已经尝试过Samples,但是什么也没得到.

In my Application I want to send files through WiFi to multiple users if they are using the same WiFi connection Without TCP. how to get the list of the users who are connected to a specified wify. I have tried with Samples But I didn't get anything .

推荐答案

Wi-Fi对等(P2P)允许具有适当硬件的Android 4.0(API级别14)或更高版本的设备通过彼此直接连接没有中间访问点的Wi-Fi(Android的Wi-Fi P2P框架符合Wi-Fi联盟的Wi-Fi Direct™认证计划).使用这些API,您可以在每台设备都支持Wi-Fi P2P时发现并连接到其他设备,然后通过快速连接进行通信,通信距离远超过蓝牙连接.这对于多用户游戏或照片共享应用程序之类的在用户之间共享数据的应用程序很有用

Wi-Fi peer-to-peer (P2P) allows Android 4.0 (API level 14) or later devices with the appropriate hardware to connect directly to each other via Wi-Fi without an intermediate access point (Android's Wi-Fi P2P framework complies with the Wi-Fi Alliance's Wi-Fi Direct™ certification program). Using these APIs, you can discover and connect to other devices when each device supports Wi-Fi P2P, then communicate over a speedy connection across distances much longer than a Bluetooth connection. This is useful for applications that share data among users, such as a multiplayer game or a photo sharing application

http://developer.android.com/guide/topics/connectivity/wifip2p.html 您还可以参考此链接以编程方式了解更多信息

http://developer.android.com/guide/topics/connectivity/wifip2p.html You can also refer this link to know more about programmatically

这篇关于如何通过WiFi发送数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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