Code example for Field

Methods: get, isAccessible, setAccessible

0
		// out); 
		return out;
	} 
	 
	private static Object getFieldValueSafely(Field field, Object classInstance) throws IllegalArgumentException, IllegalAccessException {
	    boolean oldAccessibleValue = field.isAccessible();
	    field.setAccessible(true);
	    Object result = field.get(classInstance);
	    field.setAccessible(oldAccessibleValue);
	    return result;      
	} 
 
	public static Object getRequestQueue(Context ctx) throws Exception {
		Object ret = null;
		Class networkClass = Class.forName("android.webkit.Network");
		if (networkClass != null) {
			 
			// this code works for api level < 11 
			Object networkObj = invokeMethod(networkClass, "getInstance", new Object[] { ctx },
					Context.class);
			if (networkObj != null) {