[android-developers] Re: Downloading Problem

2010-11-14 Thread Android Humanoid
Thanks a lot everyone, We have found the solution for this... the url fomats that the browser supports are not supported by the android emulator, so we changed the url formats a bit. Thanks again! :) On Nov 11, 12:03 pm, kernelpanic j.m.roya...@gmail.com wrote: I went through this a couple of

[android-developers] Re: Downloading Problem

2010-11-11 Thread kernelpanic
I went through this a couple of months back with our server where we had the same script sometimes provide a content-length, other times the length was -1 AFAIK, -1 is a valid response when the server can't determine the length. In researching the issue, we found our solution was in the server

Re: [android-developers] Re: Downloading Problem

2010-11-10 Thread Kostya Vasilyev
Doing http networking this way: URLConnection ucon = url.openConnection(); doesn't seem to work very well. Take a look at DefaultHttpClient, there is lots of sample code for it. -- Kostya 10.11.2010 7:46, Android Humanoid пишет: No... nothing in logcat, download competed in 0sec am

[android-developers] Re: Downloading Problem

2010-11-10 Thread Bob Kerns
I don't know what's happening to you specifically, but I do observe this behavior with regular web browsers and certain broken web servers. The server will get an error, either consistently or occasionally, and fail in such a way that the browser just sees a close. If there's no Content-Length:

Re: [android-developers] Re: Downloading Problem

2010-11-10 Thread Catalin Braica
Hello Shouldn't you be testing for the HTTP status code ? Just a quick example: you can get zero-byte content in case of a redirect from the part of the server (3xx status code). In this case I see there is a flag to automatically follow redirects (HTTPUrlConnection.instanceFollowRedirects), but

[android-developers] Re: Downloading Problem

2010-11-10 Thread Android Humanoid
Hi Bob Kerns, I'm not using any browser dependent code in my application, I'm just sending the request from the business logic. Hi catalin Braica, The length of the content that am getting is -1, The server is ours only, so I asked the server persons to look into the logs what exactly logged,

[android-developers] Re: Downloading Problem

2010-11-10 Thread Android Humanoid
The code is working fine for the links that I got from internet, Hi Kostya Vasilyev , The problem is same even with DefaultHttpClient. On Nov 11, 10:16 am, Android Humanoid droid.hu...@gmail.com wrote: Hi Bob Kerns, I'm not using any browser dependent code in my application, I'm just

[android-developers] Re: Downloading Problem

2010-11-09 Thread Android Humanoid
No... nothing in logcat, download competed in 0sec am getting, but there is nothing in the file. On Nov 9, 2:21 pm, Kumar Bibek coomar@gmail.com wrote: What is the problem? Any exceptions/errors in our logcat? On Tue, Nov 9, 2010 at 2:33 PM, Android Humanoid droid.hu...@gmail.comwrote: