[android-developers] Re: Obtaining IP address when on 3G (MOBILE) connection

2009-03-18 Thread Regina Mitsue Azuma
I was able to get the IP address using the following code: public String getLocalIpAddress() { try { for (Enumeration en = NetworkInterface.getNetworkInterfaces(); en .hasMoreElements();) { NetworkInterface intf = en.nextElement();

[android-developers] How to detect PDP context activation/deactivation and out of coverage scenarios?

2009-02-12 Thread Regina Mitsue Azuma
I'm developing an application that makes an intensive use of data connection in GPRS network. I'm currently using DatagramSocket and I have some questions with regarding to PDP context activation and network failures. In summary, I would like to know how to detect programmatically some scenarios a