i just found the NetworkInfo class. i'll give that a try. On Wed, Dec 23, 2009 at 10:32 AM, Jeffrey Blattman < [email protected]> wrote:
> i am struggling to find a way to determine if a valid network is available > to an app. specifically, if there's a problem making a network connection, i > would like to be determine if it's on the client (app) side, or a problem > with the remote server. > > i happen to be attempting a URL connection (using http client) and the wide > and varied possible exceptions don't seem like a reliable method. for > example, when the network is down on the phone, i received "unknown host > exception", which doesn't really indicate the root cause ... it's possible > to get that exception with a valid network connection also. at other times i > get other exceptions, such as socket exception. > > is there a way to ask the phone if it's network ready? > > the other option i thought was to ping a known good server to see if it > responds ... with an IP address. kind of a heavy weight option and not > foolproof. > > ? > > thanks. > -- 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

