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.
# 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
# 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.
# 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!