Android :: How To Trace HTTP Requests / Responses?

Jul 22, 2009

How to trace the HTTP requests/responses e.g. by using Wireshark? I am using soap web services i want tocheck wheather the soap request from the web service sis going properly.I neee the Xml response from the server but non xml format i am getting how to check this request and response using Wireahark or any other process.

Android :: How to trace HTTP requests / responses?


Android :: Simultaneous Http Requests

Jan 13, 2010

Is there a limit on the number of simultaneous http requests of the form:

HttpResponse response = client.execute(request);

I'm interested in any official limit as well as practical ones.

(In a previous life, you had to dig deep to discover that WinMo only allowed three WebRequests to be open at a time.)

Let's say I have a list of 20 files to download on a background thread.

Should I: Download them one at a time, blocking the thread (but not the UI thread) to wait for each one? Start 20 threads each downloading one of the files?

I expect the answer may be somewhere in between, where I create C threads and work on the queue of N files, where C is a number like 3 or 4.

I suspect some of you here have already done some experimentation and know the magic number. In addition, I suspect there may be more efficient ways of doing what I'm doing than creating a new DefaultHttpClient for each request.

View 10 Replies View Related

Android :: How To Do Async HTTP Requests?

Feb 23, 2010

Im using a web service, so I want to use an async thread for the HTTP authentication request and another thread later to make additional service requests while my main thread runs.Would like to see a good example of how to do this and how to show busy messages somehow in main app. How does the main app know when the thread finished? And what if my thread encounters exceptions, how do I deal with that?HTTP requests are sent later, use the same cookies setup up by the first auth request, so will the later requests pick up the same cookies and just work?

View 2 Replies View Related

Android :: Something That Will Log All HTTP Requests Phone Makes?

Aug 29, 2010

I saw an message "page could not be loaded" in an app that I was using which made me realize that it's UI may be HTTP based somehow. Is there a way that I can find out where it is sending its requests?

View 4 Replies View Related

Android :: Multi Threaded Http Requests Cause Exception

Jan 27, 2010

I have an app making an https post on one thread while performing a file download on another thread. For some odd reason, I am getting a ClientProtocolException saying that "The server failed to respond with a valid HTTP response". The error goes away if everything is run on a separate thread. Oddly if I run the two server requests in serial, the error goes away. It seems there's a bug that happens when two requests are made at the same time.

Important note: The post occurs to a different server than the download so the servers themselves should not be causing the problem. The code is simple. Here's the file download code:.............

View 9 Replies View Related

Android :: How To Use Separate Thread To Perform Http Requests?

Aug 2, 2010

I have an application that is performing HTTP Requests (specifically calling the FogBugz API) when the user clicks certain buttons. Right now, I am just creating a service when the application starts, and then calling different methods in that service to complete requests. However, when I do this, there is the usual hang in the UI thread. I have looked at AsyncTask, but am not sure it will do what I want to accomplish. Because I need to instantly parse the XML that the HTTP Request returns, I need to have a process that is able to return this data to the UI thread. Will ASyncTask be able to accomplish this, or is there some other way.

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 :: Sending Multiple Http Requests To Django

May 19, 2010

I am developing a microblogging platform in which I need to populate the page with Post (user defined class with fields) obtained from the Django server using HttpGet.In the client side(Android) I am using GSON to parse the responses from server to the type Post. So I require that server should send Post's one by one so as to add each of them to a list of Posts after parsing and then finally notifying the list adapter of changes in the data set after all Post's have been added.But the problem coming when intially loading the application, the page has to be populated with 10 latest Post's from the server. So I thought of a rather dirty way of sending 10 httpget requests to the server one after the other to the server. The code looks like this.I was thinking of executing it 10 times in a loop to get the 10 Post's I require. But in Django as far I know (correct me if I am wrong) there's no way to keep an index of the last sent Post to the client and so no way to send the 'next' Post on the next HttpGet request. So I am out of ideas.I feel there's a better way to do this efficiently.

View 1 Replies View Related

Caching Of HTTP Requests (HttpResponseCache)

Jan 14, 2014

I'm trying to employ HttpResponseCache to cache each HTTP-request sent with HttpURLConnection.

why I get hit count always zero?

Code:

HttpResponseCache.getInstalled().getHitCount()
Usage:

Code:
for(int i = 0; i < 2; i++){
try {
HttpURLConnection connection = (HttpURLConnection) new URL("http://www.google.com").openConnection();
connection.setUseCaches(true);
if(i == 1){
try {

[code]....

On 2'nd run I have "NOT cached" in console and hit count == 0.

View 2 Replies View Related

Sending And Receiving Asynchronous HTTP Requests?

Jul 20, 2012

I developed a game for Android called Jumping Bird, it writes the score obtained by the player in the database on my web server, but it does so synchronized. While it tries to write data in the database on the web, the entire game is stopped , and worse, when the server is slow, the request takes more than 5 or 10 seconds, an ANR(application not respond) error occurs and the OS tries to close the app.

I wonder how I can make that request asynchronous.There is any library that does it?

View 1 Replies View Related

Android : Want App To Display Description Corresponding To User's Responses

Oct 5, 2010

Okay, so I'm writing my first Android app and am basically stuck. The app is a short 4 question quiz with two choices per question. This creates 16 possible results, which I've created descriptions for. I want the app to display the description corresponding to the user's responses on each of the questions after the 4th question is answered. Right now I am storing the values in a string, which is supposed to build upon the previous string answer, after each question. So the first answer is t1, the second answer is t2, and so on. Here is the code for the second question: My problem is that the strings won't hold the values I assign them in the previous question. I have a textview that briefly displays the values returned by the question's answer string (t2 for Question2) and it displays null alpha or nullbeta, depending on the user's response. How do I retain the t1's previously assigned value into Question2 so I can add to it? For instance, if T = "alpha" from Question1, and the user selects button b1 in Question2 how do I make t2 actually equal "alphagamma" instead of "nullgamma"? Is this even possible with strings?

View 1 Replies View Related

Android :: How To Parse Responses From A Django Server In Droid

May 8, 2010

In the Android application I am building, I want to be able to communicate with a local server developed in Django. (Basically a login page and a home page populated with posts and images from users) So do I need to use XML Parsers for the parsing the response from a Django server or is it possible for the server to respond with strings which can be directly used? Also what about images?

Is the JSON or XML Parser easier and robust to use in Android? The responses would be basically like tweets with a username, image and message. I was thinking of using the SAXParser. Any better alternatives?

View 2 Replies View Related

HTC Droid Eris :: Responses From Showing Friends

May 22, 2010

Since getting my phone a month ago I have been showing it off like a felon.

Anyways I noticed that everyone I have showed the phone to has had to yonk it out of my hand to play with( which is sorta irritating considering they could just go to verizon to check it out)

Two of my friends have even claimed that their phones stopped working in the past month to go get themselves a new phone. One is getting the incredible and the other has gotten the iphone ( cause hes a chump).

View 40 Replies View Related

Android :: Sms Blocker - Can't Trace Person

Sep 12, 2010

This person has been texting me none stop for 3 days I've even involved the police who didn't even bother since its a cricket wireless # they can't trace. This person seems obsessed and at times honestly scares me. They've sent over a hundred texts in less than an hour. Pls I've tried googling but come up with year old posts that lead to nothing. Market searches lead to only bad reviews.

View 5 Replies View Related

Android :: Viewing Requests Made By Another App

Sep 16, 2009

Is it possible to view what requests are made to external sites/ servers by an app? Basically I'd kind of like to throw an application (I did not make) into a debugging type thing to see what requests (to where and what data) it makes. This is to kind of ensure a third party app does what it is saying, and isn't sending data elsewhere.

View 2 Replies View Related

Android :: How To Track All Https Requests?

Apr 12, 2010

How to collect URLs of all http/https requests made by the phone as well as well as the return status code and user agent from the headers. This information should be coming for all browser requests and other applications too.Please let me know this information can be retrieved on App level or we have to go to system level for this.

View 5 Replies View Related

Android :: How Can I Track Down A Crash In A .so Without A Stack Trace

Sep 20, 2010

My game is crashing on the HTC Hero and I have managed to get a user to send me their log. I don't see a Java stack trace at all. It looks like it's crashing in the OpenGL driver. I was wondering how I could go about trying to determine the problem. I was thinking of adding that acra project that sends crash reports to a server but I am thinking it will just send the same that is in this log. I have error checking everywhere so I am really at a lose where to go from here. I even went out and bought a HTC Hero but Canada only has 1.5 for the OS. Code...

View 10 Replies View Related

Android :: Stack Trace Does Not Reference Application

Dec 16, 2009

So I have an app on the market with >10k active users. I have recieved maybe 50 complaints from Droid-user that the program crashes arbitrarily. I have not been able to replicate the error with my own droid, but I got one of the to send me this crash log. However, it does not reference the application. Do you have any suggestions on how to track down this error? I stand baffled.

11-25 16:18:03.730 D/AndroidRuntime( 2964): Shutting down VM 11-25 16:18:03.730 W/dalvikvm( 2964): threadid=3: thread exiting with uncaught exception (group=0x4001b180) 11-25 16:18:03.730 E/AndroidRuntime( 2964): Uncaught handler: thread main exiting due to uncaught exception 11-25 16:18:03.761 E/AndroidRuntime( 2964): java.lang. Code...

View 3 Replies View Related

Android :: Why Phone Don't Print Stack Trace

Jul 6, 2010

Even explicitly writing e.printStackTrace() it doesn't print to the console, why?

View 3 Replies View Related

Android :: How To Trace Localhost Proxy Connection?

Jun 16, 2010

I'm currently trying to debug an issue with my application and I wanted to see if my internal proxy is sending the data in the proper order. Is there any way to essentially sniff my proxy pipe?

View 3 Replies View Related

Android :: Trace File Is Created But Empty

Jul 23, 2009

I have a problem with creating a trace file containing logs on my app. I use Debug.startMethodTracing("tracing"); and in my onDestroy() method i stop the methodTracing. Everything is going fine, like my file is created on my phone BUT it is empty, and i don't get why because it worked once and since i can't get it working. Here is the log ive got, and it says that it is writting on the file, so this is acting a bit weird. Code...

View 3 Replies View Related

Android :: How To Get Function Call Trace On Phones

Jul 14, 2010

Does anybody know how can I get the build-in function call trace on Android phone?

View 7 Replies View Related

Android :: How AJAX Requests Work On 2.0 / 2.2 Emulators?

Jul 22, 2010

I'm testing out a web page on the Android 2.0 and 2.2 emulators, and the jQuery.ajax() requests that the app makes have slightly different behaviors regarding HTTP Authentication Headers. The server I'm making requests to requires basic authentication, and the ajax requests in 2.2 send the proper auth header. In 2.0, I am debugging with Fiddler, and it seems that the requests do not include the auth header, and the server rejects the request with a 401.2 error. I don't think it matters, but the server is running IIS 7. One interesting thing I noticed while debugging the web requests is that Android 2.2 makes two requests for each resource, whether or not it's an XHR. One does not contain the Auth header, and the second one does. In 2.0, it seems to make 2 requests for everything but XHR's:

Here is the 2.2 header for the first XHR:
GET http://192.168.1.111/sonar/mobileweb/sonar/views/week/init.ejs HTTP/1.1
Host: 192.168.1.111
Accept-Encoding: gzip
Referer: http://192.168.1.111/sonar/mobileweb/sonar/sonar.html
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Accept: text/plain, */*
X-Requested-With: XMLHttpRequest
Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7

The 2.2 header for the second XHR:
GET http://192.168.1.111/sonar/mobileweb/sonar/views/week/init.ejs HTTP/1.1
Host: 192.168.1.111
Accept-Encoding: gzip
Referer: http://192.168.1.111/sonar/mobileweb/sonar/sonar.html
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Authorization: Basic cGFyaXZlZGFcZGF2aWQubW9ycmlzOjIzbkx2ZWxsbGw=
Accept: text/plain, */*
X-Requested-With: XMLHttpRequest
Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7

And the 2.0 header:
GET http://192.168.1.111/app/views/week/init.ejs HTTP/1.1
Host: 192.168.1.111
Accept-Encoding: gzip
Referer: http://192.168.1.111/app/app.html
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Linux; U; Android 2.0; en-us; sdk Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17
Accept: text/plain, */*
X-Requested-With: XMLHttpRequest
Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7

Has anyone experienced this behavior before? It is basically causing my app to not work at all in version 2.0. Version 2.1 seems to act the same as 2.0.

View 2 Replies View Related

Android :: Load Https Requests With Webview

Jun 2, 2010

I'm trying to load https requests with a Webkit object but It shows only a blank page, with http requests I don't have problems, It shows the page correctly. I have look the source code of the browser, in http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a... but I don't understand how the browser process the https requests. I think that the class BrowserActivity process the http and https requests but I don't see how to do it. Somebody could explain how the browser process the https request? It uses a Webview object to show the response of the https requests?

View 5 Replies View Related

Android :: Ajax Cross Domain Requests

Nov 7, 2010

The behavior of XMLHttpRequests in Android is very odd when doing cross domain requests. The browser should either fail with an error and not perform the request, or it should follow CORS (http:// www.w3.org/TR/access-control/) and start with an OPTIONS request to the remote domain. The Android browser (2.1 and 2.2) instead performs the request, which is received by the remote server (and this is the dangerous part both for data leaking and remote attacks), but the response is not set in the javascript (status of 0 and responseText null)

View 4 Replies View Related

Android :: Error In Pulling Trace File -sdcard

May 21, 2010

I created sdcard and mounted it on my emulator , after closing my app , when i try to pull to copy the files (using command:adb pull /sdcard/calc.trace /tmp)i get this error:"remote object /sdcard/calc.trace does not exist".I am listin gdown the commands in sequence.

1)f:>mksdcard 1024 ./myimage

2)f:>emulator -sdcard ./myimage -avd 1

3)(After running my app and exiting the app)adb pull /sdcard/calc.trace /tmp

In my activity i have start/stop method tracing with fiename calc.trace. i am running windows.

View 1 Replies View Related

Android :: Stack Trace / Fix A Bug That Doesn't Point To Any Of Code?

Jun 8, 2010

How do I fix a bug that doesn't point to any of my code? I got the stack trace below from the Marketplace crash reports, but I have no clue how to fix it since it points to none of my own code.

java.lang.NullPointerException:at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:487)at android.view.View.measure(View.java:7964)at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023) at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)at android.view.View.measure(View.java:7964)at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023)at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)at android.view.View.measure(View.java:7964)at android.view.ViewRoot.performTraversals(ViewRoot.java:763)at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)at android.os.Handler.dispatchMessage(Handler.java:99)at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4363)at java.lang.reflect.Method.invokeNative(Method.java:-2)at java.lang.reflect.Method.invoke(Method.java:521)at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:­860)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)at dalvik.system.NativeStart.main(NativeStart.java:-2)

I'm not seeing any issues on any emulators or devices.

View 4 Replies View Related

Android :: How Can I Catch SIGSEGV - Get A Stack Trace Under JNI On Phone?

Jul 4, 2009

I'm moving a project to the new Android Native Development Kit (i.e. JNI) and I'd like to catch SIGSEGV, should it occur (possibly also SIGILL, SIGABRT, SIGFPE) in order to present a nice crash reporting dialog, instead of (or before) what currently happens: the immediate unceremonious death of the process and possibly some attempt by the OS to restart it. (Edit: The JVM/Dalvik VM catches the signal and logs a stack trace and other useful information; I just want to offer the user the option to email that info to me really.)

The situation is: a large body of C code which I didn't write does most of the work in this application (all the game logic) and although it's well-tested on numerous other platforms, it's entirely possible that I, in my Android port, will feed it garbage and cause a crash in native code, so I want the crash dumps (both native and Java) that currently show up in the Android log (I guess it would be stderr in a non-Android situation). I'm free to modify both C and Java code arbitrarily, although the callbacks (both going in and coming out of JNI) number about 40 and obviously, bonus points for small diffs.

I've heard of the signal chaining library in J2SE, libjsig.so, and if I could safely install a signal handler like that on Android, that would solve the catching part of my question, but I see no such library for Android/Dalvik.

View 3 Replies View Related

Android :: Trace Memory / Window Leaks In Droid?

May 17, 2010

How to trace the Memory Leaks in Android Development? I am working on eclipse IDE to develop the application. i cant find out how to rectify the memory or window Leaks Exceptions? Any Idea.

Mainly the Window Leaked error raises the Illegal Argument Exception? how to rectify both og this.

View 1 Replies View Related

Android :: Can Phone Pause WiFi Scan Requests?

Aug 19, 2010

I wrote an android application to request a scan for available WiFi signals around, using the WifiManager, then dump the results to a file. The program works fine, but this weird bug occurs. Initially I was requesting a scan every 30 seconds, and everything worked fine. I then tried to request a scan every two seconds, I get this strange bug. Everything will work fine for a few minutes, then the time between two scan requests jumps from 2 seconds to 50 seconds for no reason.

Then, for four more scans, it will scan at 2-second intervals, then skip to a 50-second interval, and it continues to do this consistently. With larger time intervals this bug does not appear. Has anyone experienced this bug before? Is there a way to prevent it? Or does Android automatically cancel scan requests if they are too frequent?

View 1 Replies View Related







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