Periodically checking for internet connection
I know this may sound silly but what exactly do mean by connected to the internet? You're going to have to define what this means to your application. 

In your example, if "www.google.com" goes down then the user is no longer connected to the internet and this is not necessarily true. Last time I checked, google isn't the internet (although it is very close). 

The problem all boils down to the fact that the user may be connected to some part of the internet but unable to reach other parts due to corporate/national firewalls, broken equipment, wrongly configured hosts files etc. Or just a very zealous ISP who insists every one go through their gateway googlez.net to show you ads on every google search.

It makes more sense to test for an URL that actually means something for your application (I can't tell what this is going to be used for so I can't offer anything more specific). Like a service that you interact with.

As you see it's a tricky question and you need to answer some of these questions before you can come up with a good solution.