My app performs some backgound data collection and I\'m adding support for the user network preferences, such as performing background updates and data roaming. I have the
Additionally to your checks I also do check for roaming state for 3g network:
NetworkInfo info = m_connectivityManager.getActiveNetworkInfo();
int netType = info.getType();
int netSubtype = info.getSubtype();
if (netType == ConnectivityManager.TYPE_WIFI || netType == ConnectivityManager.TYPE_WIMAX)
{
//no restrictions, do some networking
}
else if (netType == ConnectivityManager.TYPE_MOBILE &&
netSubtype == TelephonyManager.NETWORK_TYPE_UMTS)
{
//3G connection
if(!m_telephonyManager.isNetworkRoaming())
{
//do some networking
}
}
My application uses a lot of data, so I do not allow data downloading on non-3g mobile networks.