简体   繁体   English

蓝牙在Android中使用wifi的行为

[英]Bluetooth like behavior using wifi in android

Is it possible to mimic bluetooth like behaviour in android using Wifi adapter.I am trying to use Wifi to setup client sever application.I have created a system service in android 2.3.7. 是否有可能使用Wifi适配器模仿android中的蓝牙行为。我正在尝试使用Wifi设置客户端服务器应用程序。我在android 2.3.7中创建了系统服务。 I want this service to identify the server automatically.As in bluetooth, A naive approach shall be to search for available devices and then send a connection request at specific port say 8080 and the connection is established. 我希望这项服务能够自动识别服务器。与蓝牙一样,一种简单的方法是搜索可用的设备,然后在特定端口(例如8080)发送连接请求,并建立连接。 can this be done using wifi. 可以使用wifi完成此操作吗? In a nut shell i wish that the system services on two different devices communicate with each other using wifi,ie, One device works as a ad-hoc wifi server and the other connects to it as a client Does this sounds doable? 简而言之,我希望两个不同设备上的系统服务可以使用wifi相互通信,即,一个设备充当ad-hoc wifi服务器,而另一个则作为客户端连接到服务器,这听起来可行吗? The basic point being to emulate the bluetooth like behavior in absence of bluetooth on emulator. 基本要点是在模拟器上没有蓝牙的情况下模拟类似蓝牙的行为。 Any help is appreciated. 任何帮助表示赞赏。

Not an android expert, but I remember it not supporting ad-hoc connections, which seems to be what you'd like to do. 不是Android专家,但我记得它不支持即席连接,这似乎是您想要执行的操作。

Related answer: How to connect android wifi to adhoc wifi? 相关答案: 如何将android wifi连接到adhoc wifi?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM