bharath - 2013-10-25

Can someone tell me how to connect to the google calendar when proxy is enabled. Below is what i tried and it dint work.

private static CalDavCalendarStore createCalendarStore(String email_id, String password, String protocol, String hostServer, int port, PathResolver pathResolver){

    try 
    {
        System.setProperty("http.proxyHost", "***************");
        System.setProperty("http.proxyPort", "80");
        System.setProperty("https.proxyHost",""***************");
        System.setProperty("https.proxyPort", "443");

        URL url = new URL(protocol, hostServer, port, "");
        store = new CalDavCalendarStore("-//iCal4j Connector 1.0//EN", url, pathResolver);
        store.connect(email_id, password.toCharArray());

    } catch (Exception e) {
        e.printStackTrace();
    }

    return store;
}
 
Last edit: bharath 2013-10-25