Code example for NetworkInfo

Methods: getSubtype, getType

0
		} 
	} 
 
	 
	private int getConnectionTypeFrom(NetworkInfo info) {
		if (isTypeMobile(info.getType()))
			return info.getSubtype();
		else 
			return info.getType();
	} 
 
	private boolean isTypeMobile(int type) {
		return ConnectivityManager.TYPE_MOBILE == type ? true : false;
	} 
	 
}