同时将 Android 连接到两个无线网络

发布于 2024-10-20 23:46:40 字数 103 浏览 6 评论 0原文

我想让我的android同时连接两个网络,第一个是wifi网络来获取互联网连接,另一个是ad-hoc网络(手机之间用于共享一些数据的网络),但android只能加入一个同时网络,有什么想法!!

I want to make my android connects two networks at the same time, the first one a wifi network to get internet connection and the other one ad-hoc network ( a network between mobiles to share some data), but the android can join only one network at the same time, Any ideas!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

厌味 2024-10-27 23:46:40

您所要求的目前无法完成。您一次只能连接到一个网络。然而,有一个名为 WiFi direct 的标准可以让您执行您所要求的操作,但尚未在 Android 中实现。我最近与谷歌的一位 Android 工程师讨论了这个问题,他们正在研究这个问题,所以看来你在不久的将来就能实现你所要求的,但现在还不行。

What you are asking for can not currently be done. You can only be connected to one network at the time. However, there is a standard called WiFi direct that will allow you to do what you are asking for, but it isn't yet implemented in Android. I recently talked with an Android engineer at Google about this, and they are working on it, so it appears you will be able to what you are asking for in the near future, but not right now.

缺⑴份安定 2024-10-27 23:46:40

PC:

这可以通过微软的虚拟 WiFi 切换器来完成。
您可以同时连接到我们的两个无线网络。

PC/Android/iPod/iPhone - 双/三重连接:

您可以将您的电脑连接到 Android 手机或 iPod Touch/iPhone(越狱),并使用适用于 Android 的 wifi 共享和适用于 Android 和 iPodTouch/iPhone 的 USB 共享。

安卓/iPhone:
•连接到蜂窝网络和WiFi。

虚拟WiFi
Research.microsoft.com/en-us/downloads/994abd5f-53d1-4dba-a9d8-8ba1dcccead7/

PC:

This CAN be done with microsoft's virtual wifi switcher.
You can connect to two our more wireless networks at once.

PC/Android/iPod/iPhone - Double/Triple connection:

You can connect your pc to your android phone or iPod Touch/iPhone(Jailbroken) with wifi teathering for android and usb teathering for both android an iPodTouch/iPhone.

Android/iPhone:
•Connect to cellular network and WiFi.

Virtual WiFi
research.microsoft.com/en-us/downloads/994abd5f-53d1-4dba-a9d8-8ba1dcccead7/

走走停停 2024-10-27 23:46:40

创建两个线程。使用这些线程进行网络连接。线程可以同时运行。因此网络连接也会同时处理。如果您需要为一个连接提供更高的优先级,请为该线程设置较高的线程优先级。还为另一个线程设置较低的线程优先级。

我有一个本地设备连接和一个服务器连接。最初两者都是在 AsyncTask 中完成的(如果服务器连接正在进行,那么我无法连接本地设备)。但我需要对本地设备有更多的偏好,并且还需要同时进行通信。所以我尝试了这个。对我来说效果很好。

Create Two Threads. Use these threads to do the network connection. Threads can run simultaneously. So network connection also will process simultaneously. If you need to provide more priority for one connection set the thread priority high for that thread. Also set less thread priority for another thread.

I have one local device connection and one server connection. Initially both done in AsyncTask(If server connection is going on then i can't connect local device). But i need more preference for local device and also need to do both the communication simultaneously. so i tried this. It was working fine to me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文