Edit: I misread the question. Paul's answer is a better one. It could be done with a different plugin. I'll keep my answer as a reference on how to detect if an app is online/offline.
----
We include the Mobile Features widget in our mobile app examples (you can add it yourself, add it to a layout).
This uses Phonegap plugins. One of those is the ability to see if an app is online or offline (as in, is there an internet-connection or not)... This class will be added to the body, which you could use to display a message.
Here's the explanation: https://github.com/mendix/MobileFeatures#transition-classes
1. You add a text to your application, and give it a class: 'offline-message'. The text says something like 'It looks like your app is offline, please make sure there is an internet connection'.
2. You need to add some things to your styling (added to your CSS or .SCSS files):
.app-online .offline-message { display: none; }
.app-offline .offline-message { display: block; }
3. You could even make a more general class, something like 'hide-offline'. That way you could hide buttons when the app is offline.
This will make it possible for the user to spot any issues with their connection. This should work fine with any Mobile App that has this widget in its layout.
AFAIK there's not default way to do this.
You could create a widget using a Cordova plugin though:
https://www.npmjs.com/package/cordova-plugin-network-information
Thanks for the suggestions, you've been a great help :)