Android Development module and Proxies

This semester the CM3019 module: Programming Mobile Devices was updated to use the Google Android SDK. We also thought an Introduction to Android Mobile Programming would make an interesting workshop for our Recent Applicants Days.


We ran up against a problem when accessing internet resources; namely being behind behind an Internet proxy stopped a lot of the api’s from getting through; for CM3019 it was simply accessing an HTML page and on the workshop the app couldn’t get access to the Google Maps API.


The fix we found was quite simple and worked for us just fine but I have seen reports from other people that it doesn’t work for them.



If you  launch the SDK and include -http–proxy <proxy> in the command line, the two problems resolved themselves quite nicely.



-http-proxy <proxy> : Make all TCP connections through a specified HTTP/HTTPS proxy


The value of <proxy> can be one of the following:




The http:// prefix can be omitted. If the -http-proxy <proxy> command is not supplied, the emulator looks up thehttp_proxy environment variable and automatically uses any value matching the<proxy> format described above.


Now, the next thing to do is go round the labs to add -http-proxy to all our launch scripts… Lovely.


The information in the section above was extracted from: