Code example for Field

Methods: getInt

0
		sdkInt = 3;
		Field fld;
		try { 
			Class<?> cl = android.os.Build.VERSION.class;
			fld = cl.getField("SDK_INT");
			sdkInt = fld.getInt(cl);
			Log.i("cr3", "API LEVEL " + sdkInt + " detected");
		} catch (SecurityException e) {
			// ignore 
		} catch (NoSuchFieldException e) {
			// ignore 
		} catch (IllegalArgumentException e) {
			// ignore 
		} catch (IllegalAccessException e) {
			// ignore 
		} 
		return sdkInt;
	} 
	 
	public static boolean supportsActionBar() { 
		return getSDKLevel() >= HONEYCOMB;