ExampleApp/src/com/altinn/apps/fisher/utils/Utils.java
/**
	 * This method checks network availability
	 * @param context
	 * @return
	 */
This method checks network availability
@param context
@return
This method checks network availability @param context @return
public static boolean isNetworkAvailable(Context context) {
		ConnectivityManager cm = (ConnectivityManager) context
				.getSystemService(Context.CONNECTIVITY_SERVICE);
		if(cm.getActiveNetworkInfo() != null && cm.getActiveNetworkInfo().isAvailable()
				&& cm.getActiveNetworkInfo().isConnected()){
			Log.d("NETWORK-IFO ---", "TRUE");
			return true;
		} else{
			Log.d("NETWORK-IFO ---", "FALSE");
			return false;
		}
	}
public static boolean isNetworkAvailable ( Context context ) { ConnectivityManager cm = ( ConnectivityManager ) context . getSystemService ( Context . CONNECTIVITY_SERVICE ) ; if ( cm . getActiveNetworkInfo ( ) != null && cm . getActiveNetworkInfo ( ) . isAvailable ( ) && cm . getActiveNetworkInfo ( ) . isConnected ( ) ) { Log . d ( "NETWORK-IFO ---" , "TRUE" ) ; return true ; } else { Log . d ( "NETWORK-IFO ---" , "FALSE" ) ; return false ; } }
This method checks network availability
 @param context
 @return
This method checks network availability @param context @return