Automatic Update

Hi Fans,

My application needs automatic updates.

In fact i know how to tell the mobile phones, that a new version is available. I think i will use an sms or the mobiles looks up the newest version by calling a servlet or what ever.

My Problem is, that i dont know how to install a new version of my midlet through a midlet itself. You know what i mean?

The jad and jar file of the new version is available on a webserver and my midlet knows the url and that it shall update itself. How can i do this?

thx for ur help!

[558 byte] By [casjena] at [2007-11-27 8:07:02]
# 1

Have u heard of any method like this ?platformRequest (String url)

excerpt from javadoc :If the URL specified refers to a MIDlet suite (either an Application Descriptor or a JAR file),

the application handling the request MUST interpret it as a request to install the named package. In this case, the

platform's normal MIDlet suite installation process SHOULD be used, and the user MUST be allowed to

control the process (including cancelling the download and/or installation). If the MIDlet suite being installed is an

update of the currently running MIDlet suite, the platform MUST first stop the currently running MIDlet suite before

performing the update. On some platforms, the currently running MIDlet suite MAY need to be stopped before any

installations can occur.

find_suvro@SDNa at 2007-7-12 19:49:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
Hi there, thanks a lot. I think this is what i needed. I am sorry, but i havent heared of that method before. ill try it!
casjena at 2007-7-12 19:49:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
u shouldn't be sorry for not knowing something. nobody is smart enough to know all the stuffs.
find_suvro@SDNa at 2007-7-12 19:49:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

HI aggain!

thx for ur help so far, but another problem appeared while readind the api vor plattformRequest(String url). It says that if true is returned the currently running midlet has to be stoped to perform the desired installation.

How do i stop my midlet and procced the installation? in case on my Nokia E 50 the method returns true.

Does that mean, that i have to perform a MIDLet.exitMIDlet() ?

mfg

Casjen

casjena at 2007-7-12 19:49:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5

Well it depends on the set. For specifically Nokia :

For Series 40 phones (I donno about the new 3'rd edition ones) u have to call destroyApp() after platformRequest().

For Series 60 phones device will handle that pretty efficiently.

Now it depends on u and ur target handsets.

find_suvro@SDNa at 2007-7-12 19:49:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 6

Hi,

thank u very much for ur help. I am near the point to get it working :-)

My app is calling the platformRequest() and shuts down itself. Afterwards the updates starts and the software download begins.

But when the download is finished an error appears, which i dont understand. I am running the german version of symbian OS on my Nokie E 50 so I translate the error message by my self. It is like "Jad and Jar file size are not the same". I did not change the jad oder jar file on the server from which the app gets the update from first the installation to the point i try to run the update.

Anyone any suggestions to this case?

Bigthx!

casjena at 2007-7-12 19:49:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 7

additional Info:

I recognized that i dont have to call destroyApp() after calling the platformRequest() to get the application shutted down. I simply call the platformRequest() with my http link to the jad file and the E 50 asks me to shut down the application while updating.

greets

Casjen

casjena at 2007-7-12 19:49:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 8
Well it m8 be something like "Jar file size are not the same in Jad and the Manifest file". Check that manually if this is true. You should update both the files in order to work it properly. And it is also recommended to change the version.
find_suvro@SDNa at 2007-7-12 19:49:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...