It all depends on the campus network access policy. You cannot do this if your Campus proxy firewall does not provide access to these sites. However, you can ask them to allow this URL through their proxy server.
Or simply you can use some other external proxy server by adding lines to your code
System.setProperty("https.proxyHost", "<IP>"); System.setProperty("https.proxyPort", "<Port>");
where are you trying to connect the Google API. Say if you use something like this,
URL url = new URL("https://android.googleapis.com/gcm/send"); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type", "application/json"); conn.setRequestProperty("Authorization", "key="+<your api key>);
Before these lines, where you are trying to connect to the Google APIs, add the proxy settings lines, the above two lines. Also, try with a proxy server on campus, as well as with another external proxy server, you will find out that the problem is with your proxy server on the campus or not.
Try this, hope this helps with your problem .. !!!!!
source share