Real-time connectivity information for mobile devices, allowing applications to determine whether a device is connected to the network