×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Dec 2005
    Posts
    121

    Javascript mimeTypes array is not updated with new content-type support

    Hello!

    I use a reconignzer + helper application to handle a custom content-type

    From now on: plugin = reconignzer + helper application

    I need to detect if a client has the plugin that handles my own content-type.

    The idea is:

    When the user selects a url with the S60 Browser:

    if (client has the plugin installed) then
    get the url that points to the content (custom content-type)
    else
    get the url that installs the requiered plugin (sis file)

    --------------------

    For this purpose I use the following JavaScript code:

    ---------------------------------------------------------------------

    <html>
    <head>
    <title>Check plugin installed</title>
    <body>
    <script type="text/javascript">

    var x = navigator

    length = x.mimeTypes.length
    document.write("no. mimes " + length)

    var Found=0

    for (var i=0; i < length && !Found; i = i + 1){

    if (x.mimeTypes[i].type.match("application/customtype")){
    document.write("Plugin Installed")
    Found=1

    // get the url that points to the content

    }

    }

    if (!Found){
    document.write("Plugin NOT Installed")

    // get the url that installs the requiered plugin
    }


    </script>

    </body>
    </html>

    -----------------------------------------------------

    The problem is that the phone must be restarted in order to detect the new content-type (mimeTypes array is not updated with the new content-type)

    NOTE: The plugin can be used without needing to reboot the phone. I only need to reboot the phone in order to detect the presence of the plugin from the Javascript code (when the phone is restarted, mimeTypes arrays gets updated correctly including my own content-type)

    NOTE 2: I'm testing this javascript code in 6680 (FP2) and N70 (FP3)

    Do you know how can I workaround this limitation?

    Thank You very much.

  2. #2
    Regular Contributor
    Join Date
    Dec 2005
    Posts
    121

    Re: Javascript mimeTypes array is not updated with new content-type support

    Hello again!

    Probably this information is uselful for someone:

    I have tried to implement the same behaviour with HTML OBJECT TAG

    This html code works correctly on FP2 and FP3:

    ------------------------------------------------------

    <HTML>
    <HEAD>
    <TITLE>Detect plugin</TITLE>
    </HEAD>
    <BODY>

    <OBJECT
    data="custom type url"
    type="application/customtype">

    <OBJECT
    data="custom.SIS"
    type="application/vnd.symbian.install">
    </OBJECT>
    </OBJECT>
    </BODY>
    </HTML>


    ----------------------------------------------


    The problem is that the S60 Browser asks the user many times and this behaviour is not desired. It is preferable an automatic process that does not bother the user with too many interactions.

    NOTE 1: Until FP1, S60 Browser includes all supported content-types in the Accept HTTP Header. From FP2, this is not possible due to performance reasons. That is why I have to discard this way.

    NOTE 2: I'm considering to use a real S60 Browser Plugin to acomplish this task (TASK = detect custom content type support without restarting the phone to acomplish automatic downloading of the custom plugin when the mention plugin is not provisioned on client mobile phone). The problem is that the Web Browser Plugin that comes with S60 3Ed SDK (the only web plugin that I know) doesn't not work on S60 FP2 and FP3 (or I don't how to make it work).
    I hope that if I implement the support for the content type using a real
    S60 Browser Plugin the mimeTypes array will be updated when the plugin is installed (or when the browser is restarted) with out restarting the phone.

    Your help is really really appreciated!

  3. #3
    Super Contributor
    Join Date
    Oct 2005
    Posts
    739

    Re: Javascript mimeTypes array is not updated with new content-type support

    Hi AlfredoRU,

    I am trying to develop a web browser of my own for fp2 device. Will you please give me some idea on where to start. The http example gives the html data as out put how can we convert that to a web page.

    Any suggessions will be helpfull

    thanks and regards
    Peter

Similar Threads

  1. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50
  2. Content Authoring SDK whith SMIL support.
    By Royessers in forum General Messaging
    Replies: 2
    Last Post: 2003-05-26, 08:15
  3. Is the browser of Nokia 9210i support Javascript?
    By joe2002 in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-08-08, 06:46
  4. What phones support "On-the-phone Content preview" ???
    By pinservice in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2002-06-10, 04:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×