StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again. It supports apps which hide the status bar and The Notch
Why do you think that https://github.com/lamydev/Android-Notification is a good alternative to StatusBarOverlay