FYI the emulator doesn't simulate wifi, so all you have is an emulated GPRS/EDGE/3G connection.
On Wed, Dec 3, 2008 at 7:12 AM, Andrea <[EMAIL PROTECTED]> wrote: > > 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 android-developers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---