Any idea for this problem?

On Mar 17, 8:42 pm, ademiguelglez <[email protected]> wrote:
> I'm stuck with the same problem.
> Any help?
>
> Regards,
> Alejandro.
>
> On 22 feb, 10:19, Vibhor Mahajan <[email protected]> wrote:
>
> > I am not able to access Internet from Android web browser but Internet
> > is accessible from Development machine's web browser. Yes, Internet
> > access using Android web browser is OK using Android 1.6 by Settings
> >proxyusing APN settings.
>
> > Any help of accessing Internet from Android 2.1?
>
> > Regards,
> > Vibhor
>
> > On Feb 20, 3:34 am, Sam Dutton <[email protected]> wrote:
>
> > > I'm no expert, but it looks like you might be having trouble with the
> > >proxyrather than troublesettingaproxyfrom Android.
>
> > > Can you use theproxyelsewhere, e.g. from a web browser?
>
> > > You say thatsettingtheproxyworked until Android 1.6 -- can you use
> > > theproxyif you use an early SDK version?
>
> > > Here are some ways to use theemulatorbehind aproxy-- not sure
> > > which of these you've tried.
>
> > > 1. Set the defaultproxyfrom Windows > Preferences > Android >
> > > Launch.
>
> > > 2. Add '-http-proxyhttp://www.example.com:80'toDebugConfigurations> 
> > > Target (pane) > AdditionalEmulatorCommand Line
>
> > > Options (you need to resize the dialog to see this).
>
> > > 3. Set theproxyon theemulatorfrom Settings > Wireless controls >
> > > Mobile Networks > Access Point Names > T-Mobile US > ...
>
> > > For me, none of these works on its own -- though a colleague tells me
> > > that 2. works on his Mac.
>
> > > What works best for me in most contexts is to set theproxyon the
> > >emulator(as per 3.) and then use the following in my code:
>
> > > final String proxyHost = android.net.Proxy.getDefaultHost();
> > > final int proxyPort = android.net.Proxy.getDefaultPort(); // returns
> > > -1 if not set
> > > if (proxyPort != -1)
> > > {
> > >         System.setProperty("http.proxyHost", proxyHost);
> > >         System.setProperty("http.proxyPort",
> > > Integer.toString(proxyPort));
>
> > > }
>
> > > With DefaultHttpClient, I do this:
>
> > > client = new DefaultHttpClient();
>
> > > String proxyHost = android.net.Proxy.getDefaultHost();
> > > int proxyPort = 0;
> > > proxyPort = android.net.Proxy.getDefaultPort();
> > > if (proxyPort > 0) // !!!hack: this means that aproxyhas been set
> > > {
> > >         HttpHostproxy= new HttpHost(proxyHost, proxyPort);
> > >         client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,
> > >proxy);
>
> > > } else {
>
> > >         Log.d("Proxycould not be set for port: ",
> > > Integer.toString(proxyPort));
>
> > > }
>
> > > Sam Dutton
>
> > > On Feb 19, 12:37 pm,VibhorMahajan <[email protected]> wrote:
>
> > > > Hello,
>
> > > > I am trying to configure http_proxy settings for Internet access from
> > > > Androidemulator(behind aproxy). I tried following options:
>
> > > > 1. -http-proxyoption usingemulatorcommand.
> > > > 2.settinghttp_proxy environment and then launching theemulator.
> > > > 3. Settingsproxyusing APN settings (Telkilla) (this worked till
> > > > Android 1.6 version)
> > > > 4. adding an entry in settings.db <adb shell  sqlite3 /data/data/
> > > > com.android.providers.settings/databases/settings.db "INSERT INTO
> > > > system VALUES(101,'http_proxy','10.0.0.27:80');">
> > > > adb shell  sqlite3 /data/data/com.android.providers.settings/databases/
> > > > settings.db "SELECT * FROM system"
>
> > > > I also checked -debug-proxylog messages and it showed below messages
> > > >emulator.exe -avd avd_21 -debug-proxy-http-proxy
> > > > http://vibhor.mahajan:[email protected]:80
> > > > proxy_http_setup: creating httpproxyservice connecting to:
> > > > 10.0.0.27:80
> > > > server name '10.0.0.27' resolved to 10.0.0.27:80
> > > > proxy_http_setup: creating HTTPProxyService Footer is (len=63):
> > > > 'Proxy-authorization: Basic dmliaG9yLm1haGFqYW46eHl6fjEyMzQ=
>
> > > > '
> > > > http_service_connect: trying to connect to 209.85.231.104:80
> > > > http_service_connect: using HTTP rewriter
> > > > tcp:209.85.231.104:80(1496): cannot connect toproxy: <unknown error>
> > > > http_service_connect: trying to connect to 209.85.231.104:80
> > > > http_service_connect: using HTTP rewriter
> > > > tcp:209.85.231.104:80(1496): cannot connect toproxy: <unknown error>
> > > > http_service_connect: trying to connect to 209.85.231.104:80
> > > > http_service_connect: using HTTP rewriter
> > > > tcp:209.85.231.104:80(1456): cannot connect toproxy: <unknown error>
> > > > http_service_connect: trying to connect to 209.85.231.104:80
> > > > http_service_connect: using HTTP rewriter
> > > > tcp:209.85.231.104:80(1440): cannot connect toproxy: <unknown error>
> > > > http_service_connect: trying to connect to 10.0.0.22:80
> > > > http_service_connect: using HTTP rewriter
> > > > tcp:10.0.0.22:80(1440): cannot connect toproxy: <unknown error>
> > > > http_service_connect: trying to connect to 10.0.0.22:80
> > > > http_service_connect: using HTTP rewriter
> > > > tcp:10.0.0.22:80(1440): cannot connect toproxy: <unknown error>
>
> > > > Kindly suggest how can we access Internet fromemulator(behind a
> > > >proxy).
>
> > > > Thanks,
> > > >Vibhor

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to