Hi Andrea,

I do have a G1 here in Brazil and the WiFi IP address works fine with that
code. In Emulador, it will show zero.

Regards,

Marcio Alexandroni
www.cialogica.com
w  Tel. 55 11 3717-2345
   Cel. 55 11 9989-8316
[EMAIL PROTECTED] 
 marcioalexandroni

-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrea
Sent: Wednesday, December 03, 2008 13:13
To: Android Developers
Subject: [android-developers] Re: Wifi Ip Address


Marcio: Yeah, that is what i am looking for, but on the emulator
info.ipAddress returns 0. I hope on a real device it returns the
actual ipAddress. I don't have one to test!

thanks to all.
Andrea

On Dec 3, 2:57 pm, "Marcio Alexandroni" <[EMAIL PROTECTED]>
wrote:
> Would it be:
>
>         WiFiManager wifi = (WifiManager) getSystemService(WIFI_SERVICE);
>         DhcpInfo info = wifi.getDhcpInfo();
>
> DhcpInfo has all the WiFi configurations. Of course you have to add the
> permissions below to the manifest. I'm not sure you need both but it
worked
> with those.
>
> <uses-permission
> android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
> <uses-permission
> android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
>
> Marcio Alexandroniwww.cialogica.com
> w  Tel. 55 11 3717-2345
>    Cel. 55 11 9989-8316
> [EMAIL PROTECTED]
>  marcioalexandroni
>




--~--~---------~--~----~------------~-------~--~----~
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