You may want to check the connection when the app is started, but you can choose to invoke this plugin every-time you communicate with the server. In either case, you can add your logic to the success and error callbacks.
Usage :
First, obtain the fingerprint of the SSL certificate of your server(s). You can find it f.i. by opening the server URL in Chrome. Then click the green certificate in front of the URL, click 'Connection', 'Certificate details', expand the details and scroll down to the SHA256 fingerprint.
or
https://www.grc.com/fingerprints.htm