How can I popup when no connection the default Connection Failed dialog?
<p>Whenever a application needs internet and connection fails, I get a message dialog </p>

<p><code>Connection failed<br>
This application requires network access. Enable mobile network or Wi-Fi to download data.</code></p>

<p>and two buttons, Settings, Cancel.</p>

<p>How do I detect there is no internet connection?<br>
How do I popup a same dialog in my application?</p>
