lients</a>.</p>

<h2 id="connection">Check the Network Connection</h2>

<p>Before your app attempts to connect to the network, it should check to see whether a
network connection is available using 
<code><a href="../../../reference/android/net/ConnectivityManager.html#getActiveNetworkInfo()">getActiveNetworkInfo()</a></code>
and <code><a href="../../../reference/android/net/NetworkInfo.html#isConnected()">isConnected()</a></code>. 
Remember, the device may be out of range of a
network, or the user may have