ConnectionDetector.java added , helps to check  internet connectivity