Android :: Http Proxy And Chunked Encoding With Emulator

Mar 24, 2009

I am having a specific problem that is preventing me using the android SDK from work. We are using a MS Proxy here that all internet traffic has to go through. The problem seems to be when the emulator is trying to access a site that uses 'Transfer-Encoding: chunked' If I attempt to download www.nds.com (no chunked encoding) into the browser, it works fine. However if I try to go to www.google.com (uses chunked encoding), the browser fails with the message: can't determine content length, and client wants to keep connection opened My feeling (and I'm no expert in this area) is that the underlying code managing the communication through the proxy is not dealing with the null terminator on the chunk encoded response when the connection to the proxy is being kept open? Does anyone have any experience in this area? Is the source to the emulator available so I can try and understand what is going on here?

Android :: http proxy and chunked encoding with emulator


Android :: HTTP Proxy For Emulator On 1.6 R1 SDK?

Oct 22, 2009

I am developing applications for Android in a company where the Internet is accessable via a proxy server only. I found out that the emulator of the 1.5 R3 SDK works well with the option -http-proxy, but the emulator of the 1.6 R1 SDK does not. Is this a bug in the 1.6 R1 SDK? And if so, is there a chance this gets fixed in - let's say - 1.6 R2? Or am I just doing something wrong, though providing the same options for the 2 different emulator versions?

View 9 Replies View Related

Android :: How To Set HTTP Proxy On Emulator?

Jan 12, 2010

I'm developing android application in my university that must use the internet through proxy server. In Android SDK 1.5 I use parameter - http-proxy when starting emulator and it working. But since Android SDK 1.6 until now (2.1) this approach is not working.

View 4 Replies View Related

Android :: Chunked Encoding - GZIP Input Stream

Mar 3, 2010

I found a problem with GZIP input stream when wrapping InputStream from HttpURLConnection. When the server response with Transfer- Encoding=chunked, Content-Encoding=gzip and Connection=Keep-Alive. The second post always return -1. After digging into the source code, I found the place that could be a bug: InflaterInputStream.java (line 190 to 192) if (inf.needsInput()) { fill(); } Because InflaterInputStream doesn't need more input, it doesn't try to read the end of chunked encoding (0x)(30 0a 0d) that cause the second post to return with -1 every time.

View 3 Replies View Related

Android :: Http Proxy Settings Not Working In Emulator 2.1

Feb 19, 2010

I am trying to configure http_proxy settings for Internet access from Android emulator (behind a proxy). I tried following options:

1. -http-proxy option using emulator command.

2. setting http_proxy environment and then launching the emulator.

3. Settings proxy using APN settings (Telkilla) (this worked till Android 1.6 version)

4. adding an entry in settings. CODE:.........

I also checked -debug-proxy log messages and it showed below messages

CODE:..............

How can we access Internet from emulator (behind a proxy).

View 11 Replies View Related

Android :: Configure HTTP Proxy With Latest Android Emulator On Windows?

Sep 25, 2010

I'm at complete odds over configuring a proxy to inspect the HTTP(S) traffic for the app I'm developing. I've tried running Fiddler2 and Charles Web Proxy, both run on 127.0.0.1:888, and starting up the Android emulator with the parameter:

To test it out I open the Android browser. I see in Fiddler2 that the request is routed through the proxy. However, only RARELY does the request receive a successful response. In most, and when I say most I mean 99% of the time, the request is retried and fails again with the Android browser telling me "The server failed to communicate". Has anyone found a way to configure Fiddler2 or Charles for debugging HTTP(S) traffic through the Android emulator?

View 1 Replies View Related

Android :: Http Chunked Response - Connection Reset

Sep 6, 2010

I'm facing an annoying problem here. My application is connected to a server that sends some data from time to time. It's some kind of eventing server. In order to receive data, I'm connecting to the server with an HttpURLConnection, retrieve the response InputStream and loop on it with the read method. The connection is always open. The distant server is cutting the connection every 5 minutes (for test purpose). When connection is closed, my application has to reconnect again. We detect a Connection Reset by Peer exception when the server closes the connection. The problem is that most of the time, I never receive the Connection Reset by Peer exception. So my application can't know that is has to reconnect and it's stucked on the read instruction. The InputStream.Read() method shouldn't always raise an exception if the connection is closed? What can I do to always detect Connection Reset by Peer exception?

View 15 Replies View Related

Android :: How To Set HTTP Proxy In Programmatic Way?

Sep 2, 2010

I'm looking for a programmatic way to set-up http proxy settings for android handsets. I've tried using android.provider.Settings.System.putString() to set System.HTTP_PROXY, but my call fails (I'm using a 2.2 emulator image at the moment). My code looks like:
if (System.putString(getContentResolver(), System.HTTP_PROXY, "10.10.2.1:8080")) {
tv.append("put for HTTP_PROXY succeeded. ");
} else { tv.append("put for HTTP_PROXY failed. "); }

I've also added to my android manifest:
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
Although it's not clear from the docs which permission, if any, is required.

I'm familiar with this SO thread, but the technique there requires manual adb commands, which require the SDK tools and (possibly) a rooted phone. Is there a way to accomplish this? Ideally, I'd like away to set an http proxy that will be used for both data and WiFi connections.

View 1 Replies View Related

Android :: HTTP Connection Failed Via Proxy

Apr 26, 2009

I have set up proxy in the sdk emulaotor and can access internet via the proxy in the browser. but this does not work for my http connection application, it gives "Unknown host exception" i have used -dns-server option when launch the app.

View 2 Replies View Related

Android :: How To Set HTTP Proxy In Real Device?

Jul 6, 2009

I had tried to use the sqlite3 to add a proxy information in the com.android.providers.settings/databases/settings.db, but I still couldn't access the Internet through browser on a real device. I had also tried to use the ProxySetting ap to set proxy. It couldn't work either. Is there any idea to set the http proxy on a real device?

View 2 Replies View Related

General :: How To Make Android Apps To Use HTTP Proxy

Nov 30, 2011

When I connect to the student's wifi network, it requiers to configure the proxy with authentification. Well I'm fine with that, and the browser works all right, but all of the apps which require internet access aren't working. I also noticed, that when I'm configuring the proxy in the settings, it actually says that the HTTP proxy will be used by the browser, but not by some of the apps (in my case none of the apps work, including the pre-installed apps like android market, youtube or google maps).

So my question is that is there any way to make the apps work with the HTTP proxy? I should say that I found this thread on this forum:

[URL]

but I had trouble understanding it. Also if this matters, I'm using an Asus Eee Pad Transformer running android 3.2.1.

View 9 Replies View Related

Samsung Galaxy I7500 :: Proxy Via HTTP For Using Android Market?

Jul 8, 2010

My provider only permits me to connect to the internet via the web-browser. Only the web-browser works. I want to use the Android market, but it doesn't connect. Is there some sort of proxy I could use to get around this? I can connect to the market if I'm on my home WiFi, but not if I'm on my network GPRS.

View 13 Replies View Related

General :: How To Set HTTP Proxy For Apps

Apr 29, 2014

My problem is that all my devices are on a wifi network that uses http/https/ftp/SOCKS proxy settings to connect to internet. All the devices connect to internet after I use proxy settings on them. But few applications such as skype do not connect to internet. They work fine when I connect to a wifi network that does not use any proxy settings (at home), but at work when I have to use proxy settings to access internet, the apps fail to connect. I have a couple of devices which are not rooted (Fujitsu Stylistic M532 tablet, Garmin-Asus A10 phone) and I am not sure if I can root them. I would really want to use all the apps.

View 9 Replies View Related

Pass App HTTP Traffic Through Proxy Installed On PC?

Nov 3, 2011

I am tring to debug an android app. I need to pass all the http trafic of my htc desire s through a proxy server( Paros, WebScarab, etc.) that i have on my pc. I need to intercept the http messages.

I have rooted the phone and installed a proxy on it. I have connected the phone and the pc to the same wifi so that they will be in the same network. After this i have put the pc's ip in the Proxy Host: "192.168.1.2" and the port "8080" on the Proxy Port field because Paros Proxy uses 8080.

View 1 Replies View Related

Android :: Setup Emulator Proxy Settings

Oct 15, 2009

I want to to use the browser inside the Android Emulator, and i want to use the proxy settings on my machine, how can i setup this.

Reading the very good manuals of android, they tell me i should start android using the following command

emulator -avd myavd -http-proxy http://168.192.1.2:3300

But still am not able to use the emulator browser. am using the IPAddress for my proxy server.

View 2 Replies View Related

Android :: Setting Up A Proxy Server For Droid Emulator?

Oct 14, 2009

I want to start Android Emulator with internet support but am unable to use the brower on the emulator, it seems like it is not connected. This is the command am using to start the emulator

emulator -avd myavd -http-proxy http://168.192.10.1:3100

Please note am using an IPAddress instead of machine name on my proxy server name. Is this possible with the emulator?

Or what am i doing wrong? Am using Android SDK 1.6

View 2 Replies View Related

Android :: Proxy Support Not Working In Droid 1.6 Emulator / Way To Fix

Sep 17, 2009

After upgrading to SDK 1.6 the emulator seems to be unable the Internet through a proxy (-http-proxy option). The same is working in SDK 1.5R3.

Can anyone confirm? Did I miss something?

View 2 Replies View Related

Android :: Unable To Connect With Internet In Emulator Behind Proxy In Windows

Sep 22, 2010

I tried to connect to internet behind proxy in windows.But I cant. I tried with the "-http-proxy" in command line and in eclipse but both did not worked for me.

View 1 Replies View Related

Android :: 2.0.1 Emulator : APN Proxy Setting Unable To Function As Before / Change Its Behavior?

Dec 24, 2009

I wrote a http proxy on Android 1.5 four months ago. It can work properly on both 1.5 and 1.6 emulator, with APN proxy setting to 127.0.0.1. However, when i port this app to 2.0.1, it's not working anymore. Did browser on emulator 2.0.1 change its behavior? It seems that the browser no longer consider APN proxy as http proxy anymore. Or it's simply a bug on emulator?

View 2 Replies View Related

Android :: Android 2.0.1 Emulator - Not Able To Get Proxy Settings To Work

Dec 4, 2009

This link has some suggestions for proxy setting for early (pre-1.5) and later (1.5 thru 1.6) Android emulators. Basically, the older emulator used a "com.android.provider.setting.db" database or -http-proxy command line switch to set proxy/port/userid/ password. Android 1.5 and 1.6 used: Home->Menu->Settings->WirelessControls- >MobileNetworks->Access Point Names to set multiple proxy/port/userid/

View 6 Replies View Related

Android :: Wireshark Not Showing HTTP Packets For Emulator

Mar 24, 2010

I'm trying to use wireshark to capture some HTTP packets exchanged between the emulator and a website. However, even though I can see the web content on the emulator browser, wireshark does not display any HTTP packets exchanged between the emulator and the website. Why is this?

View 2 Replies View Related

Android :: Test Http Post Response In Emulator?

Oct 26, 2010

Let's say I want to perform a quick HTTP post to a website within my android app. If I were to set up the http client and send the post all in the onCreate method of the main screen (inside the UI thread) just for testing purposes, what would I use to quickly see what the response is to the post? I tried something quick and dirty below inside the onCreate method when the app first opens and nothing really happens, is there something more I need to do/obviously my toast idea is just bad.

HttpClient httpClient = new DefaultHttpClient();
HttpPost post = new HttpPost("http://forecast.weather.gov/zipcity.php?inputstring=04419");
HttpResponse httpResp;
try {
httpResp = httpClient.execute(post);
StatusLine status = httpResp.getStatusLine();
Toast.makeText(getApplicationContext(), (CharSequence) status, Toast.LENGTH_SHORT).show();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();}

View 1 Replies View Related

Android :: Injecting HTTP Header Into All Requests By Emulator

Mar 17, 2009

Is there an easy way to inject a header into all HTTP request sent from the emulator, including HTTP requests made by my app and also by the built-in web browser? I need this ability to model the behavior of a carrier gateway. I tried running the emulator through Fiddler as a proxy because I know how to manipulate HTTP requests in Fiddler, but that that didn't work. The emulator was successfully able to make the first HTTP request, but choked on subsequent ones. Reading this list, it seems that getting the emulator to use a proxy is not is not that easy. If this is the only way to do what I need, then I'll certainly give it another shot and post details about any problems I encounter. I am just wondering if perhaps there is an easier way to inject a header.

View 3 Replies View Related

Android : Debug HTTP Response With Droid Emulator?

Aug 20, 2010

I would like to know if there is anyway to debug the HTTP response with the android emulator. my logs show that the response is not arriving complete to the application and i would like to know if it is the server that does not send the complete response or if my application is not processing the response completely.

I tried hooking up Fiddler and Blurp proxy, it actually works with Blurp proxy but only for HTTP and as you may guess i need it also for HTTPS

View 2 Replies View Related

Android :: Web View Encoding? Why?

May 28, 2010

I have started to work with the WebView component of Android Platform, but the API to load data to the component is confusing me, because it includes a parameter with a encoding. In both methods: public void loadData (String data, String mimeType, String encoding); public void loadDataWithBaseURL (String baseUrl, String data, String mimeType, String encoding, String historyUrl); you have to specify an encoding. In both cases, the API documentation says that is is the encodign of the data (data parameter). Well, as know, if you provide data as a String object, the String is internally stored in UTF-16 (unicode). To get a String object from a external source, you need to specify the external source encoding to convert it to UTF-16 and get the String internal representation (String(byte[] data, String encoding)). So, at this moment, when you have an String instance, everything from the original source has been converted to UTF-16. So, why do you need to specify an encoding if you are providing the data as a String object?

I don't know the internal implementation of WebKit, but let's suppose that, WebKit has a method, to render a source, providing as content an InputStream and a default encoding. Well, as I know, when you process a HTML page, you use the default encoding to read the HTML characters, and if you find a <meta> tag specifing a different encoding, from that moment, you have to use the new encoding to decode the characters of the HTML page. But what happens if you supply a HTML page that contains this <meta> tag: <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1"/> using one of the methods specified at the top of this post, how are you going to read ISO-8859-1 encoding from a String that it is in UTF-16 encoding? if the WebKit filtering this <meta> tags, and doesn't taking in account the encoding specified in this tag? Well, all of this is very confusing for me, because I don't understand why the API includes this encoding parameter. I also don't know if the <meta> encoding tags are filtered when the source is provided as a String? Can anyone solve my doubts?

View 2 Replies View Related

Android :: How To Check Encoding In Java

Nov 19, 2010

I am facing a problem about encoding.

For example,
I have a message in xml format encoding is "UTF-8".

CODE:.........

Now, this message are supporting multiple language.
Traditional Chinese (big5), Simple Chinese (gb), English (utf-8)

And it will only change the encoding in specific fields.
For example (Traditional Chinese),

CODE:..........

Only "蘋果" and "橙" are using big5, "<product_name>" and "</product_name>" stills in use utf-8.
<price>1.3</price> and <price>1.2</price> are using utf-8.

How do I know which word is using different encoding?

View 3 Replies View Related

Android :: Defining Data Encoding Of SMS Messages

Aug 24, 2010

I'm working on an application using the SMS apis for android. The receiving end is an embedded unit that only supports 7-bit encoded SMS and the string I'm sending consists only of symbols from this particular alphabet which makes you think that Android is going to send it encoded as 7 bit. But that is not the case.Therefore I'm searching for a way to specify what encoding to use. See below for what my code looks like today. The method gsm7BitPackedToString turns a byte-array to a 7-bit string, i.e. the string only consists of 7-bit compatible characters and is copied from the internal android api. Code...

View 2 Replies View Related

Android :: Default Encoding Of Operating System?

Feb 5, 2010

What is the default encoding of android system?

View 1 Replies View Related

Android :: What Xml Encoding Work For Non European Languages

Mar 15, 2010

Assume I want to write an xml resource file with a a non-europian language, say japanese, thai or chinese-What encodings can I use and what do I have to to to both the xml header and the Writer to makes these work - Also is there an easy way to map a Locale into acceptable encodings

View 4 Replies View Related

Android : Way To Update SDK / Support Encoding Qcelp

Apr 8, 2009

I've added one new feature to Opencore & Framework to let them support encoding qcelp. But I found that Eclipse cannot figure out this new feature, e.g.

recorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_QCELP);recorder.setAudioEncoder(MediaRecorder.AudioEncoder.QCELP);

Eclipse now does not think RAW_QCELP & QCELP as legal symbols. So, what should I do to update the SDK to pass though this issue? Overwrite its system.img, boot.img or some *.jar packages?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved