title: Check internet connection in android studio throughout the application. (Do we need to write connectivity manager function in each java activity?)
body: <p>I have made an android studio project, but I need to check for internet connectivity during each user interaction. I know the usage of the connectivity manager, and several other functions, but this is needed to be implemented in each activity. Can anyone provide any better solution or any better idea. So that the application shows a dialog box whenever the internet goes off.</p>