create your own post. On 12/08/2008, androidfromCordoba <[EMAIL PROTECTED]> wrote: > > Hello again, > Another question: > How could I simulate whit the emulator a connection with a configured > local wifi netwok in which my localhost is in? > Is that possible or I must get the real device? > > Thaks very much > > On 3 dic, 14:57, "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 >> >> >> >> -----Original Message----- >> From: android-developers@googlegroups.com >> >> [mailto:[EMAIL PROTECTED] On Behalf Of Andrea >> Sent: Monday, December 01, 2008 19:43 >> To: Android Developers >> Subject: [android-developers] Re: Wifi Ip Address >> >> Xavier: I don't want to change the ip. I want only to know the ip that >> is assigned to the NIC of the phone. >> Ed: Sure, but showipaddress.com shows only the ip with which you go >> out on the Internet: for example you could be connected to Internet >> behind NAT. >> >> I try to explain better my problem: >> I'm developing on the emulator because I'm in italy and here there >> aren't devices. My app creates a server listening on a port for >> incoming connections. On the emulator the address used to bind the >> socket is "10.0.2.15", if I want to connect to that server, say from >> another host, i have to: >> 1) make a redirection on the local interface of the host that runs the >> emulator (so 127.0.0.1:4444 forwards to 10.0.2.15:4444) >> 2) redirect my NIC interface to the local interface (say >> 192.168.2.1:4444 forwards to 127.0.0.1:4444) with a datapipe tool >> 3) connect from a client to 192.168.2.1:4444 >> 4) start communicating. >> >> Now, in a real device how is this achieved? How many interfaces the >> device has? I think it has 10.0.2.15, 127.0.0.1 and the ip address >> assigned to the phone by a wifi network. Am I wrong? >> >> Thanks- Ocultar texto de la cita - >> >> - Mostrar texto de la cita - > > > >
-- Xavier A. Mathews Student/Browser Specialist/Developer/Web-Master Google Group Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED]@[EMAIL PROTECTED] "Fear of a name, only increases fear of the thing itself." --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---