checks if the phone is connected to the internet