Whenever a application needs internet and connection fails, I get a message dialog
Connection failed
This application requires network access. Enable mobile network or Wi-Fi to download data.
and two buttons, Settings, Cancel.
How do I detect there is no internet connection?
How do I popup a same dialog in my application?