what hardware platform are you using?I am in China,today , 3G just starts to release numbers,and the competition between different 3G net cards is serious.I know, that android supports well of 3G, but that is in America, right? Are you using WCDMA? Here in China, there is TD-WCDMA and I guess WCDMA will be in May this year,I am not sure. And I want to know, if I want to produce 3G phone based android, what platform should I use. I guess there should be hardware support for 3G, right? Just as that if you want to use wifi, you need a wifi hardware module, if you want to use 3G, you need 3G network card(at least here in China, during this special transition period,).Android supports well on 3G, and seems everybody is using omap board, will that board supports 3G hardware module?
在2009-03-19,"Joseph Teo" <[email protected]> 写道: Hi Regina.. Many Thanks for the codes! :) Joseph On Thu, Mar 19, 2009 at 5:38 AM, Regina Mitsue Azuma <[email protected]> wrote: I was able to get the IP address using the following code: public String getLocalIpAddress() { try { for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en .hasMoreElements();) { NetworkInterface intf = en.nextElement(); for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr .hasMoreElements();) { InetAddress inetAddress = enumIpAddr.nextElement (); if (!inetAddress.isLoopbackAddress()) { return inetAddress.getHostAddress().toString (); } } } } catch (SocketException ex) { Log.e(S.TAG, ex.toString()); } return null; } Regards, Regina On Mar 15, 10:39 pm, Joseph Teo <[email protected]> wrote: > Hi Folks, > > I have a small question. When i'm connected to WIFI, I could use the > following code to obtain the IP address of the Android phone > > WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE); > WifiInfo wifiInfo = wifiManager.getConnectionInfo(); > int ipAddress = wifiInfo.getIpAddress(); > > However, when i'm on the MOBILE (3G) connection, is it still possible to > obtain the IP address of the Android phone? and if so, can someone post the > code snippet (e.g. like above) for getting the IP address when on 3G > Connection? > > Thanks a million! > > Rgds, > Joseph --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

