简体   繁体   English

当前如何在Android中激活wifiNetwork的端口号

[英]How to get Port number of wifiNetwork active currently in android

I have an requirement where i need to supply IP address and Port number of currently Connected Wifi network. 我有一个需要提供当前连接的Wifi网络的IP地址和端口号的要求。

I am getting IP address using WifiInfo class having getIpAddress() method. 我正在使用具有getIpAddress()方法的WifiInfo类获取IP address

But i am not able to get Port number.. Kindly provide an appropriate solution../ 但是我无法获得端口号。请提供适当的解决方案../

Portnumber of Wlan? Wlan的端口号?

You are dooing right by using the WifiManager. 您正在使用WifiManager做正确的事。 There is no WLAN port that's why you can't get the portnumber. 没有WLAN端口,这就是为什么您无法获取端口号的原因。

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

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