简体   繁体   中英

Network details for 3G network

WifiManager in android gives network details for Wifi network. But it is not possible to get network details like Gateway, DNS, for 3G network. Is there a way to obtain such details for mobile connected to 3G network. Thank you

not sure but maybe this could help you.

http://developer.android.com/reference/android/net/NetworkInfo.html

note: this method: getActiveNetworkInfo(), return a NetworkInfo object with the info of the active connection on device (3G - Wifi).

If you install Terminal Emulator and BusyBox, you have ifconfig and ip available.

In the emulator you can use "ip link show" to find out what designation is used for the device. WLAN is usually : wlan0 Modem etc : rmnet0

ifconfig wlan0 : show you for example the ip and the netmask .

ip route show : shows you the routing configuration .

Better description: Network configuration and information

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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