Auto update in Motorola i465 and i416 j2me

182 Views Asked by At

I'm developing a j2me application to Motorola i465 and i416, but i need to do the application to auto update. I followed this tutorial http://www.oracle.com/technetwork/articles/java/updatingjavame-1420213.html and the code works fine, however, apparently my carrier has blocked this function.

Here is my code:

protected void startApp() {
    //Update app      
    try {
      this.platformRequest("http://s3.amazonaws.com/pontonextel/Pontotel.jad");
      System.out.println("Update");
    } catch (Exception ex) {
      System.out.println(ex);
    }
}

and the .JAD content:

MIDlet-Jar-Size: 33305
MIDlet-1: Pontotel,,Pontotel
MIDlet-Jar-URL: http://s3.amazonaws.com/pontonextel/Pontotel.jar
MIDlet-Icon: 
MIDlet-Delete-Notify: 
MIDlet-Version: 5.0.0
MIDlet-Install-Notify: 
MIDlet-Vendor: Lar21
MIDlet-Description: 
MIDlet-Name: Pontotel

In emulator is ok but in both devices is opened the default web browser and is shown the error message "The requested Page can not be displayed".

Anyone can help me to unblock these devices or a other way to do this?

2

There are 2 best solutions below

8
mr_lou On

Welcome to StackOverflow.com

Some/most phones requires the server to have the correct MIME-types for JAR and JAD files before the phone-browser accepts them.

MIME-type for JAD: text/vnd.sun.j2me.app-descriptor

MIME-type for JAR: application/java-archive

Try setting these up on the server.

Note: Some servers requires you to wait a little while after adding MIME-types before they're in effect.

1
lrazo On

Motorola feature phones use an iDEN Open Java Application Loader to enable them to install j2me applications. There is also a known issue where the jad attribute MIDlet-Jar-Size value is not defined or different from the real jar size and it blocks the installation. Please check it out.