3

I am trying to implement my first Android C2DM aplication. I have difficulty in adding a google account. My machine is behind a proxy, but I have added an APN with the proxy,port,username,password details. I can go to the google account page using a browser, I have tried the http and https sites and I am able to access. But when I try to add a google account by going to settings-> Accounts and Sync-> Add Account->google->Already have a google account->signin->give details...It gives me this message..

Error message is "Cant establish a reliable data connection to the server"

When i used wire shark and checked the proxy it connecting to, It is not using the proxy I have given in the APN section. Anybody knows how do I solve this problem? I am using GoogleApp API Level 9 Platform 2.3.1.

need_the_buzz
  • 423
  • 2
  • 9
  • 18
  • Does your proxy support HTTPS? Due to "reliable connectiion" I guess it's safety problem... – Hurda May 10 '11 at 20:32
  • Yes it support http and https. What do you mean by safety problem? Yes our netwrok is highly secured...Can I do anything about this problem? There should be some way out or else I am in trouble :( – need_the_buzz May 11 '11 at 12:56
  • Can you get to log from Android? (logcat application from android SDK) I think adroid doesn't trust your proxy - but it's just a guess... – Hurda May 12 '11 at 11:32

2 Answers2

4

I have managed to solve this issue, The emulator was somehow not detecting the proxy settings. Then I fired the emulator from command prompt using the below command and it all worked fine and I have managed to add the google account.

emulator.exe -avd GoogleDevice -http-proxy @@@.@@.@@@.@@:$$$$ -debug-proxy

Note: @ is my proxy and $ is my port, GoogleDevice is the name of the device you would like to run.

inazaruk
  • 74,247
  • 24
  • 188
  • 156
need_the_buzz
  • 423
  • 2
  • 9
  • 18
2

the solution I found here! :

http://www.grokkingandroid.com/using-a-google-account-in-the-emulator/

alfo888_ibg
  • 1,847
  • 5
  • 25
  • 43