Internet connection message

hello guys i am trying to create an application that uses the internet but when there is internet it doesnt do anything, so i want it in such a way that when there is no internet connection the app should be able to send a popup notifying the user “No internet connection”

Have you seen this article ?

no but thanks. i think this would help