Question on Updating a Currently Running Midlet
Hello,
I am using the method platformRequest(String URL) of the Midlet class to update a currently running midlet however, the midlet has to be terminated first before the installation will actually takes place.
My question is, is there a way to automatically launch the midlet again (the new version of the midlet) after the installation?
# 1
Hi,
I haven't tried but you can try with this
in second midlet(new version)
1) Use push registry to register port. ie. in jad file enter
MIDlet-Push-1: socket://:[port no], YurMidletName, *
this will register a connection to new midlet this should appear first
2) Use Install-Notifier in same jad file as
Install-Notify : socket://127.0.0.1:[port no]
I think this will invoke the new installed midlet
Plz post the result after trying this scenario
thanks n regards
@rjun
# 2
Hello @rjun,
Thank you for replying. I will try to implement this, and will update you about my findings.
However, there is something I want to clarify about the first item though, are you suggesting that I will create another midlet? Or should I declare in the push registry the same midlet class?
What I am doing actually is that the update is invoked on the application itself, that is, I have an item in the application that will check for new updates of the application. If there is, I invoke the platformRequest method to open the link using the device's default browser.
Thanks again.