使用WiFi连接广播消息从台式机到Android设备 [英] Broadcast message from Desktop PC to Android Device using WIFI connectivity

查看:131
本文介绍了使用WiFi连接广播消息从台式机到Android设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从桌面应用程序传输信息/文件到Android设备。我的问题是,我可以连接台式WiFi设备与Android的WiFi设备没有使用任何互联网连接。我想用它就像蓝牙​​。这是可能的/可行与否?如果有可能,那么我怎么才能实现呢?什么是消息限制来传输信息/文件?

I want to transfer messages/file from desktop application to the Android device. My question is that can I connect desktop Wifi device with the Android WiFi device without any use of internet connection. I want to use it just like Bluetooth. Is this possible/feasible or not? If it is possible then how can I implement it? And what is the message limit to transfer message/file?

注:我想用它作为实时应用

Note : I wanted to use it as real time application.

请建议我有什么好的办法,如果可能的话那该怎么办了。

Kindly suggest me any good approach and if possible then how to do that.

感谢和问候Dhaval

Thanks and Regards Dhaval

推荐答案

如果你要么说服你的电脑作为无线接入点,或获取无线接入点,您可以设置电脑和之间的网络连接未修改的Andr​​oid设备。的需要注意的是,没有必要对他们成为上游因特网连接供给PC或接入点。

If you either convince your PC to function as a wireless access point, or obtain a wireless access point, you can set up a network connection between the PC and an unmodified android device. Note that it is not necessary for their to be an upstream Internet connection feeding the PC or access point.

您然后将需要编写该监听来自PC的入站TCP连接在手机上运行的服务器。任何Android应用程序与网络权限可以做到这一点,前提是你使用的端口号在未经授权的范围内。您可能有问题与无线超时和关闭,所以你可能需要使用定时器定时触发一个小型网络操作(ping到无线接入点,等等),以保持清醒。请注意,这会占用你的电池(机器人要关闭空闲的无线网络以prevent什么的)。

You would then need to write a server running on the phone which listens for inbound TCP connections from the PC. Any android application with internet permission can do this, provided that you use a port number in the unprivileged range. You may have problems with the wifi timing out and shutting down, so you may need to use a timer to periodically trigger a small network operation (ping the access point, etc) to keep it awake. Note that this will use up your battery (what android wants to shut down an idle wifi to prevent).

如果你能得到的设备和PC然而,有一个临时的无线连接,您就不需要接入点或PC功能为一体的工作,最后,两人都听说这需要根级别器官功能障碍综合征的Android设备。

If you can get both the device and the PC to work with an "ad-hoc" wireless connection you would not need the access point or PC to function as one, however last I heard this required root-level mods to the android device.

这篇关于使用WiFi连接广播消息从台式机到Android设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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