views:

114

answers:

2

I have an android application(Android 2.2) accessing internet behind proxy.

I have tried setting an APN with proxy host & port and it works fine in emulator browser. But the application fails to connect to internet.

I have also tried command line option of -http-proxy, it doesn't work.

Can somebody help me with it?

A: 

set Permission for your APP to access the Internet on your Manifest File.like..

<uses-permission android:name="android.permission.INTERNET" />

For More Info check the ApiDemos APP and these Documentation

Praveen Chandrasekaran
if for any reason that doesn't fix it, look in logcat and find out what the actual error is
Chris Stratton
I have set the internet permissions. Logcat is not displaying any error. The webview fails to load the url. It displays following:The web page at <url> might be temporarily down or it may have moved permanently to a new web address. I tried with multiple url's but result is same.
ashwini
put `http://` instead of `https://`.Hope it helps
Praveen Chandrasekaran
After some tries of debugging, logcat shows that "www.google.com:Host is unresolved." Seems DNS issue. Then I tried with IP address but it then gives security exception.
ashwini
A: 

After so many days of struggling, I found out there is an issue on android when accessing the https using apache HTTP client with proxy.

Refer this for issue.http://code.google.com/p/android/issues/detail?id=2690

The fix for the problem is here.

ashwini