An app like this already exists but I didn't have any luck with it in Froyo:
Connection State Notifier
Associated Android Forum Thread
Could you try it and see if it works for you? I could have set it up wrong.
I read about this app. But I am not sure this would help us, since our data connection (3G) never changes. The app it seems is for when 3G connection is dropped altogether.
We need something that can ping or check a server/host in the internet to make sure the connection is still active. (Keep-Alive)