Android设备之间传送数据数据、设备、Android

2023-09-06 05:47:22 作者:仅剩的微笑

我已经创建了一个Android应用程序,并想使用户能够传输数据(例如,通过TCP)。两者都有安装我的应用程序。是否有任何框架或指导如何使用蓝牙和/或W-LAN获得良好的用户体验?他们如何发起连接?

I have created an android app and would like to enable users to transfer data (e.g. over TCP). Both have my app installed. Is there any framework or guide how to use bluetooth and/or w-lan to get a good user experience? How do they initiate the connection?

谢谢!

推荐答案

我学会了如何在Android上使用蓝牙通过的此环节,分析了例子的源$ C ​​$ C。关于通过TCP / IP发送的信息,使用普通的Java为(插座,例如)。你可以把它的唯一额外的是发送一个Intent,激活无线,如果是尚未激活。

I learned how to use Bluetooth on Android by this link, analysing the source code of the example. About sending information through TCP/IP, use normal Java for that (Sockets, for example). The only extra you could put it is to send an Intent to activate Wireless if was not activated yet.