Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the Android Emulator's IP address?

Tags:

android

avd

ip

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

like image 616
Rajapandian Avatar asked Nov 12 '09 06:11

Rajapandian


People also ask

What is my local IP address Android phone?

Here's how to find local IP address on your Android phone: Go to “Settings” and tap on “About device” option at the very bottom. Here tap on “Status” and you'll find the local IP address listed under the “IP address” section.

How do I find my IP address on bluestacks?

Try this: run netstat -a in your command prompt. If you see 127.0. 0.1:5555 running , then everything is okay, else disable your firewall. Then run adb connect 127.0.


1 Answers

Just to clarify: from within your app, you can simply refer to the emulator as 'localhost' or 127.0.0.1.

Web traffic is routed through your development machine, so the emulator's external IP is whatever IP has been assigned to that machine by your provider. The development machine can always be reached from your device at 10.0.2.2.

Since you were asking only about the emulator's IP, what is it you're trying to do?

like image 119
Matthias Avatar answered Oct 13 '22 06:10

Matthias