简体   繁体   English

如何在两部Android手机之间传输字符串的ArrayList?

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

相关问题 两部Android手机之间的数据传输 - Data transfer between two android phones 两部Android手机之间的Android套接字文件传输 - Android socket file transfer between two android phones 如何使用Wifi Direct在两部Android手机之间传输文件到Android手机的下载目录而不是程序包目录 - How to Transfer files between two Android phones using Wifi Direct to Download directory of Android phone and not to Package directory 使用USB主机Api在两部Android手机之间传输数据 - Transfer Data between two android phones using Usb host Api 在不使用互联网的情况下,在两个Android手机之间来回传输文件 - transfer file to and fro between two android phones without using the internet 连接两部Android手机,通过WIFI在他们之间传输数据 - Connecting two Android phones to transfer data between them over WIFI 在没有服务器的情况下在 2 部安卓手机之间传输数据? - Transfer data between 2 android phones without a server? 两部安卓手机之间的距离 - Distance between two android phones Android - 如何组合两个ArrayLists - Android - How to combine two ArrayLists 是否可以在两个nfc支持的Android设备之间传输数据超过2次而无需移动电话 - Is it possible to transfer data more than 2 times between two nfc supported android device without moving phones
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM