Search blog.co.uk

  • « Is anyone else confused by Microsoft's behaviour in the mobile market? Now MS is giving their mobile apps exclusively to Nokia... | Tai-Dev helps Triopsis as they become one of the Guardian's "Top 100 tech-media companies" »

    Help for anyone unable to install a signed J2ME MIDlet OTA on a Mobile Device (maybe a Samsung Omnia with WM6.1?)...

    The Problem:

    Recently an end user with a Samsung Omnia (i900) device could not install a signed MIDlet that would install fine on a handful of other devices. The device would download the JAD from our server successfully (after following a link provided via SMS), and prompt the user to accept that the MIDlet was from a third-party provider and was signed accordingly. However, as soon as this was confirmed the device would display "Internet status: CONNECTING_TO_SERVER" and appear to hang for 30-60 seconds after which an error was displayed “cannot connect to server”. The annoying thing was that the JAD/JAR would install fine via a manual copy of the JAD/JAR from PC to mobile device via USB, and several other mobile devices could install the JAD/JAR OTA fine...

    I couldn’t find anything useful via a Google search or several posts to appropriate forums, including Samsung’s own Java Forum and the WM6.1 forum, resulted in some interesting discussions (many thanks to Ravztech in the Samsung forum!), but ultimately no solution...

    The Solution:

    After much head-scratching and many experiments we eventually figured out that the problem was caused by the configuration of the device (which according to anecdotal blog evidence is apparently quite common with Samsung phones...), and the device JVM itself was not configured to connect to the Internet. A simple visit to the JVM options rectified the problem:

    Start > Programs > Java > Menu > Java Settings > Changed "Select Network" to "The WAP Network" > Ok

    Bam! Job done...

    Some other thoughts / diagnostic paths...

    For anyone else suffering from a similar problem (but isn’t helped by the advice above) I thought a brief outline of my trouble-shooting/diagnostic path might be useful. Of course, I have to say this isn’t all my own work – over the time I have been a J2ME developer I have gleaned a lot of these ideas from various forums and guides, and so a big thanks to all the bloggers/posters who have helped me in the past!

    1. Problem: You can’t install a signed MIDlet OTA on a specific device? Read on...
    2. Attempt to manually install the JAD/JAR on the device by copying the files via USB or Bluetooth etc.
      • If the application does not install then most likely you will be given more information from the device error messages, such as
      • invalid certificate (check the date and time on the device is correct, check the certificate) or a
      • corrupt JAD/JAR (rebuild)
      • a random message about third-party apps (check the device is not install-locked – early Samsung phones only allowed a specific class of signed apps to be installed. I won’t go into detail here, and a Google search on the issue will turn up more info)
      • If the app installs fine manually then this points to an OTA install issue – read on...
    3. Check that your application server which is hosting the JAD/JAR files has the MIME type correctly set for both of these file types. Check out the info under the heading “Remote Deployment” in this link http://developers.sun.com/mobility/midp/articles/deploy/ and if you’re using GlassFish my earlier post in regards to setting the MIME type for Blackberry OTA installs may help http://tai-dev.blog.co.uk/2009/07/09/glassfish-j2me-blackberry-install-grrr-907-invalid-cod-http-error-6478856/
      • If the MIME types are correctly set then read on...
    4. Alter the “MIDlet-Jar-URL:” property in the JAD to be an absolute reference to the application JAR file (and not simply a relative reference)
      • Some mobile devices require that an absolute reference is required...
      • If this doesn’t help, then read on...
    5. Try serving the JAD/JAR via HTTP and HTTPS
      • Some mobile devices allegedly have issues with installing JARs via HTTPS (or HTTP)
      • No help? Read on...
    6. Try serving and installing the JAD/JAR from another server
      • This works? Sometimes a server is just poorly configured (buggered in technical terms) and so you need to figure out what is different between the server that allows installs and the server that doesn’t
      • No joy? Read on...
    7. Try installing a version of the application which isn’t signed?
      • If this works, it could indicate that the device itself has problems with installing signed apps – probably best to post to the device manufacturer forums and hope someone has an answer...
    8. Try installing another person’s J2ME app.

    I hope this helps, and if it does please let me know!!

    Daniel

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Daniel Bryant (Director) | Tai-Dev Ltd www.tai-dev.co.uk - IT Consultancy Services Specialising in JEE, Web 2.0 and RDBMS

    Bookmark and Share Follow me on Twitter!

0 Comments to Help for anyone unable to install a signed J2ME MIDlet OTA on a Mobile Device (maybe a Samsung Omnia with WM6.1?)...

Leave a comment (Login)

Comment
User
Submit
RSS Feed
RSS 1.0
Posts
Comments
RSS 2.0
Posts
Comments
Atom
Posts
Comments
Email subscription

You can receive the posts of this blog by email.

Footer:

The content of this website belongs to a private person, blog.co.uk is not responsible for the content of this website.