How can I popup when no connection the default Connection Failed dialog?

Posted by Pentium10 on Stack Overflow See other posts from Stack Overflow or by Pentium10
Published on 2010-05-12T10:15:13Z Indexed on 2010/05/12 11:14 UTC
Read the original article Hit count: 180

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?

© Stack Overflow or respective owner

Related posts about android

Related posts about android-sdk