an android method that checks for a valid internet connection wither in Network or Wifi Form