Here you can find the source of getRequestQueue(Context ctx)
public static Object getRequestQueue(Context ctx) throws Exception
//package com.java2s; import java.lang.reflect.Field; import java.lang.reflect.Method; import android.content.Context; public class Main { public static Object getRequestQueue(Context ctx) throws Exception { Object ret = null;/* w w w .j a v a 2 s . com*/ Class networkClass = Class.forName("android.webkit.Network"); if (networkClass != null) { Object networkObj = invokeMethod(networkClass, "getInstance", new Object[] { ctx }, Context.class); if (networkObj != null) { ret = getDeclaredField(networkObj, "mRequestQueue"); } } return ret; } private static Object invokeMethod(Object object, String methodName, Object[] params, Class... types) throws Exception { Object out = null; Class c = object instanceof Class ? (Class) object : object .getClass(); if (types != null) { Method method = c.getMethod(methodName, types); out = method.invoke(object, params); } else { Method method = c.getMethod(methodName); out = method.invoke(object); } //System.out.println(object.getClass().getName() + "." + methodName + "() = "+ out); return out; } private static Object getDeclaredField(Object obj, String name) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Field f = obj.getClass().getDeclaredField(name); f.setAccessible(true); Object out = f.get(obj); //System.out.println(obj.getClass().getName() + "." + name + " = "+ out); return out; } }