简体   繁体   中英

Android cellular connection IP address

How can I get my current IP address when I'm connected to cellular? I know I can use NetworkInterface as explained here:

Getting IP address of Android when connected to Cellular Network

but I want to avoid doing network operations and looking for something similar to wifi with WifiManager.DhcpInfo (the latest ip address cached by the os)

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