Okay, so everywhere on Stackoverflow people say, to check if a network connectivity is available I shall add the Permision READ_PHONE_STATE to the manifest – which is pretty ugly to me (even though many apps in the market have that permission, this one is an overkill I think; you get the IMEI, the users phonenumber etc).
So I stumbled upon the permissions ACCESS_NETWORK_STATE and ACCESS_WIFI_STATE, which should give the same result. Is there a reason why nobody uses them?
Because if not, I would not need the READ_PHONE_STATE permission, which is a little bit less scary (or do users actually don’t care anyways?)
Thanks!
I have used these permissions in many of my applications. A
BroadcastReceivercan check when the network has changed states, or you can check the connection status with something like this (source):