How to get the Android Emulator's IP address?

Viewed 146135

I want to get the currently running Android Emulator's IP address through code. How can it be achieved?

7 Answers

Within the code of my app I can get the running device IP andress easily like beolow:

WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE);
String ip = Formatter.formatIpAddress(wm.getConnectionInfo().getIpAddress());
Related