use -- 10.0.2.2  u can hard code it.127.0.0.1..will point to the emulator
itself.

On Tue, Oct 14, 2008 at 1:26 PM, MRK <[EMAIL PROTECTED]> wrote:

>
> How to get Android local IP(192.168.1.18)? not 127.0.0.1..
>
> String myIP = java.net.InetAddress.getLocalHost().getHostAddress();
> return my System local IP as 192.168.1.18
>
> it's working in java - static method
>
> but... Like that i coundn't get in Android application. It return as
> 127.0.0.1
> I have tried
>  - InetAddress.getLocalHost();
>  - ???
>
> How can i get the Android local IP as 192.168.1.18?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to