Hi iam using sdk 1.6,my browser works fine nd iam able to connect to all sites fromit.Iam behind proxy.
Iam not able to connect to gmail through my code,when i do it,i get host unresolved error.
I surfed regarding this error and found it to be something common,but none of the sites and blogs gave a solution to this problem.
I have given internet permissions in manifest file too.
The application basically tries to login to gmail with proper authentication and is supposed to fetch google contacts to emulator.
But iam not able to proceed further as i get this error please help me out!!
Any valuable suggestion welcome.
Thanks in advance
my 2 cents..
You can try and find a way to make proxy settings in your HTTPRequestHelper class. Without knowing what this class is, I cant say much.
I generally use DefaultHttpClient class that comes with default android.jar to do my transport and the code snippet I posted in my reply above, configures the proxy for me.
1. you can try to turn off the proxy and try your code
2. If you try your code on the actual device instead of emulator, and if the problem in your code is with the proxy settings alone, you can be assured that your code will work.
Your HttpRequestHelper class is using the DefaultHttpClient class. Here is what you can try:
copy the following setProxy() method in your HttpRequestHelper class.
Note: Replace the IP/port# with the IP/port# for your proxy. Also, give your username and password as argument to set credentials.
Call this setProxy() method from the performRequest() method of the HttpRequestHelper class specifically, below the line where you instantiate the DefaultHttpClient class:
That should set the proxy.
Hope that helps...
Note: you will have to comment out setProxy() when you are runnning your code on actual device or your transport wont work.