Strategy for a global network connection listener
<p>What would be the best strategy to have a network connection listener for my application that it is started when the application starts and closes when the activity exists. Could I use a service in which to register  a PhoneStateListener like this:</p>

<pre><code>((TelephonyManager)app.getSystemService(Context.TELEPHONY_SERVICE)).listen(PhoneStateListener,
                                      PhoneStateListener.LISTEN_DATA_CONNECTION_STATE);
</code></pre>
