File Downloads in Android Web Browser

by Al » Tue, 22 Sep 2009 04:03:20 GMT


Sponsored Links
 For a little while now, I've been trying to figure out why I couldn't
download video files from the website i'm working with the Android OS
web browser, although I have found a work-around solution.  For some
reason, it seems as if the Android web browser (default OS web
browser) does not properly handle the "Content-Disposition:
attachment;" header from the webserver (in this case, Lighttpd).  When
attempting to download a file, all I was seeing with both HTC Dream
and HTC Magic (most recent OS version) was that it attempted to
download the file, but it couldn't detect the file name and the file
had no content.  Now after looking through the HTTP 1.1 RFC
documentation, I've noticed that they state that the "Content-
Disposition" directive is not part of the HTTP standard (Section 15.5
of RFC2616).

I thought that this issue was possibly due to the fact that no
attachment file name was being specified, but then I came across
another section in the Hypertext Transfer Protocol specification
(RFC2616) that states the following:

"RFC 1945 and RFC 2068 document protocol elements used by some
existing HTTP implementations, but not consistently and correctly
across most HTTP/1.1 applications. Implementors are advised to be
   aware of these features, but cannot rely upon their presence in, or
interoperability with, other HTTP/1.1 applications. Some of these
describe proposed experimental features, and some describe features
that experimental deployment found lacking that are now addressed in
the base HTTP/1.1 specification." (Section 19.5 RFC 2616)  As the
grammar for that directive shows (Section 19.5.1), there can be 0 or
more disposition parameters after the "Content-Disposition:
attachment" directive.  So basically, to remedy this issue, i've had
the "Content-Disposition: attachment" directive removed from the web
server, but what I'd really like to know is if this could possibly be
a bug with the Android web browser or if it's something the developers
purposely did because that directive is not officially part of the
HTTP standard?

If anyone could give me an answer on that, it would be greatly
appreciated!  Also, if I am getting any facts mixed up or if there is
something else i'm unaware of, please let me know.

Thanks

Al

--~--~---------~--~----~------------~-------~--~----~



File Downloads in Android Web Browser

by AJ » Tue, 08 Dec 2009 13:40:22 GMT


 Hi All,

I have problem in downloading the content when "Content-Disposition:
attachment" is specified in response coming from the server.

I searched the forum and found that earlier one guy also had the
similar issues. I am facing the exactly same problem which being
specified there.

Here is the link :-


Sponsored Links


File Downloads in Android Web Browser

by AJ » Tue, 08 Dec 2009 19:42:47 GMT


 i hope at least somebody would be having any idea on this.

Thanks,
AJ



> :-



File Downloads in Android Web Browser

by AJ » Wed, 09 Dec 2009 19:14:14 GMT


 ???






> > :-



Other Threads

1. Capture EndCall key

Hi,

        i want to capture when user press the EndCall key in simulator, but
i think i'm doing something wrong cause nothing happens!
        My code is:

public class MakeACall extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent = new Intent(Intent.ACTION_CALL);
        intent.setData(Uri.parse("tel:99999999"));
        startActivity(intent);
        setContentView(R.layout.main);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent ev) {
        switch(keyCode) {
            case KeyEvent.KEYCODE_ENDCALL:
                System.out.println("Terminou!!");
                break;
            default:
                return false;
        }
        return super.onKeyDown(keyCode, ev);
    }
}

   Can anybody help me?

[]s,
     Michelle.

--~--~---------~--~----~------------~-------~--~----~

2. How to use telnet

Hi, I want my app to connect to a server via telnet, send some
commands and read the output, how can I do that?
I googled a lot but found nothing...
--~--~---------~--~----~------------~-------~--~----~

3. Developing on a regular consumer HTC Magic device

4. rild reboot repeatly because of "EOS. Closing command socket."

5. usb adb for real hardware

6. enabling ADB on a new device

7. question about KeyListener