I want to check whether any internet connection is available – i.e can I start webrequests expected to succeed.
IsCellularDataEnabled – is this true if there’s GPRS/3G/etc available?
IsNetworkAvailble – is this true if VOICE CALLS are possible, or does this too have something to do with the internet?
IsCellularDataRoamingEnabled – Should I be concerned with this at all? (I know what Data Roaming is…)
IsWifiAvailable – If this false,I can still get internet from 3G.
So what I’m looking for is:
if (/*something*/){ //you can use the internet
}
thanks
(EDIT: I don’t have a device readily available, otherwise I’d just try it out 🙂 )
IsNetworkAvailable is true, if there is some kind of data connection available, no matter which (GPRS, 3G, Roaming, WiFi or via USB cable).
IsCellularDataEnabled is true if the phone is connected via a mobile data connection. It doesn’t give you any status about Voice calls but only data.
IsCellularDataRoamingEnabled: The user is connected via a mobile data connection via a 3rd provider (roaming). You should only use a minimal amount of traffic because roaming data is often expensive for the user. (Because of that you can check this status)
IsWifiAvailable is true if you are connected via WiFi. If false there may be a mobile data connection via 3G and so on.
So, if you only want to know IF there is some kind of connection you can use IsNetworkAvailable – all other states are only giving you more detailed information about what kind of connection there is.