[英]How to transfer ArrayLists of Strings between two Android phones?
I am developing a trading card game app that allows PVP play. 我正在开发允许PVP玩的交易纸牌游戏应用。 To populate the battlefield GridView of the opponent, I need the app to be able to receive several ArrayLists of Strings from the opposing player and be able to send the same kind of ArrayLists to the opponent for the same reason. 为了填充对手的战场GridView,我需要该应用程序能够接收来自对方玩家的多个String ArrayList,并能够出于相同的原因向对手发送相同种类的ArrayList。
A web server would simply be too slow for this, as it needs to happen very quickly. Web服务器对此太慢了,因为它需要非常快地发生。 How would I go about doing this via a P2P connection? 我将如何通过P2P连接执行此操作? It seems that with Bluetooth pairing, the phone's Bluetooth framework limits what other Android phones it can pair with, so I'd like to avoid that. 似乎通过蓝牙配对,手机的蓝牙框架限制了它可以配对的其他Android手机,因此我想避免这种情况。
Is there a way for me to simply have the two player phones communicate with each other? 我有办法简单地使两个播放器手机相互通信吗?
我这是您在寻找的东西: android.net.wifi.p2p
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.