Code example for Constructor

Methods: newInstance, setAccessible

0
                Constructor c = proxyPropertiesClass.getConstructor(String.class, Integer.TYPE, String.class);
                 
                if (m != null && c != null)
                { 
                	m.setAccessible(true);
                	c.setAccessible(true);
                	Object properties = c.newInstance(host, port, null);
                 
                	// android.webkit.WebViewCore.EventHub.PROXY_CHANGED = 193; 
                	m.invoke(null, 193, properties);
                	return true; 
                } 
                else 
                	return false; 
            } 
        } 
        catch (Exception e) 
        { 
            Log.e("ProxySettings","Exception setting WebKit proxy through android.net.ProxyProperties: " + e.toString());
        } 
        catch (Error e)