In this post, Jesse Liberty talks about testing for network availability and what to do when the network is not available.
Source: Jesse's Blog
We would like to live in a world in which any time you turn your phone on the network is there, full strength. We’d also like to live in a world of peace and harmony.
Until all of this is accomplished, however, you will need to test for network availability and handle those unfortunate moments when the network is not available.