简体   繁体   English

在Android中检测连接到WiFi路由器的系统

[英]Detecting systems connected to a WiFi Router in android

My application has to connect to PC via WiFi.I need to scan and display all the PC's connected in the LAN,to which the WiFi router is connected.Is it possible to obtain all the names of the PC's connected.or rather I could get the IP of each system? 我的应用程序必须通过WiFi连接到PC。我需要扫描和显示WiFi路由器连接到的LAN中所有已连接的PC。是否可以获取已连接PC的所有名称。每个系统的IP?

I found a code blockwhich scans for the WiFi network...But I think that is not i need... 我找到了一个扫描WiFi网络的代码块...但是我认为我不需要...

The code block is : 代码块是:

wifiList = mainWifi.getScanResults();
for(int i = 0; i < wifiList.size(); i++){
  sb.append(new Integer(i+1).toString() + ".");
  sb.append((wifiList.get(i)).toString());
  sb.append("\n");
}

Can I get an apt method for my problem? 我可以解决我的问题吗?

Also my android application has to interact with the PC,via a Server program in Java,which i have successfully implemented using socket programming....Guys pls help.... 另外,我的android应用程序还必须通过Java中的服务器程序与PC进行交互,而我已经使用套接字编程成功实现了该程序。

Thnx in advance.... 提前thnx。

Short answer: yes. 简短的回答:是的。 Longer answer: way too much information to talk about in an SO post. 更长的答案:在SO帖子中谈论太多信息。 I'd start here and see if there's a way to make that do what you need. 我将从这里开始,看看是否有一种方法可以做到这一点。

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

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