Community
Participate
Working Groups
After a MIDlet is executed over the air (OTA), the suite is installed on the emulator. The problem is that after that there is no way to uninstall the suite from MTJ. in some emulators this force the user to manually delete the suite, before executing the MIDlet again
Created attachment 109973 [details] patch for this bug my solution is: before launching in OTA, check if the specific MIDlet Suite has been installed in the emulator, if so, invoke the command "emulator -Xdevice:$DeviceName$ -Xjam:remove=$MIDsuite number$" to remove the installed MIDlet Suite. all things are done at EmulatorLaunchConfigDelegate.preLaunchCheck().
The reason I found why Midlet Suite is not removed from emulator after launching in OTA mode: the "emulator -Xjam:transient=URL" command will install, run, and remove an application. but for some SDKs, take Motorola SDK for example, after launching in OTA mode, if directly close the emulator but not click "back" button(or exit from application), the installed midlet suite will not be removed. but I can't find some commands to remove the specific midlet suite forcely while launching, so my solution is to check that before launching in OTA.
hi gang, i will evaluate this patch :) gep
hi gang, i will commit this patch. the only change that i made was on the checkAndRemoveInstalledMidlet method. i changed the if statement to if (!(device instanceof JavaEmulatorDevice)){ instead of if (device instanceof AbstractCevice){ the problem is that the code cause a NPE on microemu and mpower sdk. since the fix is mostly applicable to UEI device probably this is is the best way to do the test :) gep
Comment on attachment 109973 [details] patch for this bug the code is ok to be committed. there is a single change that i did on line of code
Hi Gustavo, Thanks very much for your review. your change works fine (because currently the non-JavaEmulatorDevice is just UEIDevice), but I think a better solution is to add an extension-point like "emulatorLaunchParticipant", so that toolkits can participate in the launching process. But this may do lots of changes to the current code, so maybe we should keep it as it was, and do some changes if we need in the future. How do you think about it? (In reply to comment #4) > hi gang, > i will commit this patch. the only change that i made was on the > checkAndRemoveInstalledMidlet method. i changed the if statement to > if (!(device instanceof JavaEmulatorDevice)){ > instead of > if (device instanceof AbstractCevice){ > the problem is that the code cause a NPE on microemu and mpower sdk. since the > fix is mostly applicable to UEI device probably this is is the best way to do > the test > :) > gep
hi gang, agreed! the code is committed and you can see it on next nightly build :) gep (In reply to comment #6) > Hi Gustavo, > > Thanks very much for your review. > > your change works fine (because currently the non-JavaEmulatorDevice is just > UEIDevice), but I think a better solution is to add an extension-point like > "emulatorLaunchParticipant", so that toolkits can participate in the launching > process. > > But this may do lots of changes to the current code, so maybe we should keep it > as it was, and do some changes if we need in the future. How do you think about > it? > > (In reply to comment #4) > > hi gang, > > i will commit this patch. the only change that i made was on the > > checkAndRemoveInstalledMidlet method. i changed the if statement to > > if (!(device instanceof JavaEmulatorDevice)){ > > instead of > > if (device instanceof AbstractCevice){ > > the problem is that the code cause a NPE on microemu and mpower sdk. since the > > fix is mostly applicable to UEI device probably this is is the best way to do > > the test > > :) > > gep >
all bugs we integrated and release on MTj 0.9