Re: [android-developers] Re: String being truncated when its long

2010-08-30 Thread Jeremy Wadsack
Explicitly stating the buffer size to use (8000) is recommended by the BufferedReader API. If you don't do this it will throw warnings in the log suggesting that you do. Of course you could use a different size buffer (e.g. if you know your content is much less than that size). For very large

[android-developers] Re: String being truncated when its long

2010-08-28 Thread Kumar Bibek
The eclipse will also truncate your strings at some point or the other. I would recommend to just look at the response codes and assume that you are actually getting the whole long response. Or may be you can write the response string to a file and check that. -Kumar Bibek http://kbeanie.com On

[android-developers] Re: String being truncated when its long

2010-08-27 Thread ko5tik
I do following ( much the same as you ), but instead bothering with readline() I just use HTTP Client code to retrieve string: HttpGet get = new HttpGet(pullUrl + ?since= + since); HttpResponse response = httpClient.execute(get); JSONArray jsonArray = new JSONArray(new

[android-developers] Re: String being truncated when its long

2010-08-27 Thread Droid
I think you are hitting a capacity limit of the android and should chunk it somehow at say 3000 chars and store the chars somewhere not in memory. Droid On Aug 27, 12:13 am, Achanta krishna.acha...@gmail.com wrote: I Tested your suggestions by setting UTF-8 and I also tried the same by

[android-developers] Re: String being truncated when its long

2010-08-27 Thread DanH
I certainly hope that available Android memory is more than 3000 characters. On Aug 27, 5:14 am, Droid rod...@gmail.com wrote: I think you are hitting a capacity limit of the android and should chunk it somehow at say 3000 chars and store the chars somewhere not in memory. Droid On Aug 27,

[android-developers] Re: String being truncated when its long

2010-08-27 Thread DanH
My knowledge of the HTTP protocol is poor to begin with, and my bad memory doesn't improve it, but I vaguely recall that a single HTTP transfer is limited to 5000-odd characters (the precise number being somewhat variable) by the packet sizes used in the network. But normally the software used on

[android-developers] Re: String being truncated when its long

2010-08-27 Thread Brion Emde
I'm pretty sure that if there is a limit, it is much bigger than what people are saying here. I wrote a little Twitter example on Android and just doing the home_timeline query can return up to 200 tweets, each up to 140 characters, plus overhead. That's 10s of kilobytes per GET request. See if

[android-developers] Re: String being truncated when its long

2010-08-27 Thread ko5tik
My game has no problem to pull and parse complete highscore list: http://www.pribluda.de/highscore/lines/LinesHighscore/pull?since=0 (ok, usually it is less that that - only updates sine some moment ) I would check with some other tool ( SoapUI us the one ) if server side works properly and

[android-developers] Re: String being truncated when its long

2010-08-27 Thread Achanta
First of all thanks everyone for replying. I just discovered that the problem is not with my code but with the number of lines that the logcat is displaying. The problem was that I got a problem in my json reply format and my parsing code spits an error. So I started trying to debug it by

[android-developers] Re: String being truncated when its long

2010-08-27 Thread DanH
Great that it turned out to be so easy to debug! This is the sort of secondary problem that can drive one crazy for days sometimes. On Aug 27, 2:32 pm, Achanta krishna.acha...@gmail.com wrote: First of all thanks everyone for replying. I just discovered that the problem is not with my code

Re: [android-developers] Re: String being truncated when its long

2010-08-27 Thread Frank Weiss
Might I suggest you try debugging in Eclipse instead of with logcat. You can breakpoint and step through the code and inspect variables. It gives you much better insight into what's happening in your code than logcat or toast. -- You received this message because you are subscribed to the Google

[android-developers] Re: String being truncated when its long

2010-08-26 Thread Achanta
I Tested your suggestions by setting UTF-8 and I also tried the same by removing the length 8000. But it still does the same thing. Thank you for the response though. This thing is driving me nuts. On Aug 26, 4:58 pm, Jake Radzikowski radzikowski.j...@gmail.com wrote: reader = new

Re: [android-developers] Re: String being truncated when its long

2010-08-26 Thread Jake Radzikowski
Could you try removing the responseHandler? On Thu, Aug 26, 2010 at 4:13 PM, Achanta krishna.acha...@gmail.com wrote: I Tested your suggestions by setting UTF-8 and I also tried the same by removing the length 8000. But it still does the same thing. Thank you for the response though. This

[android-developers] Re: String being truncated when its long

2010-08-26 Thread Achanta
Hi Jake, I was actually doing this without the response handler. I tried that one only when I started facing this problem. But the result is the same. On Aug 26, 5:21 pm, Jake Radzikowski radzikowski.j...@gmail.com wrote: Could you try removing the responseHandler? On Thu, Aug 26, 2010 at

Re: [android-developers] Re: String being truncated when its long

2010-08-26 Thread Jake Radzikowski
Ex that I was seeing things apparently. On Thu, Aug 26, 2010 at 4:21 PM, Jake Radzikowski radzikowski.j...@gmail.com wrote: Could you try removing the responseHandler? On Thu, Aug 26, 2010 at 4:13 PM, Achanta krishna.acha...@gmail.comwrote: I Tested your suggestions by setting UTF-8 and I