Running the Java MIDlet one after another | Telit Cinterion IoT Developer Community
June 29, 2017 - 6:14pm, 3011 views
Hello,
In my EHS5, I have installed 5 MIDlets. Is there a way to use Autostart so that JRC is started first and only one of other MIDlets? Or do I have to uninstall the other MIDlets which are no longer required ? What command should be given once to achieve the above scenario?
Best Regards,
Umair
Hello,
There is one global setting for autostart (AT^SCFG="Userware/Autostart") which affects all the MIDlets including JRC.
So you should rather not deactivate it as the JRC MIDlet will not start either.
Besides that you can place the autostart related fields to the MIDlet's jad file:
- Oracle-MIDlet-Autostart: [0-5], autostart order. 0 means no autostart. For MIDlets with the same level the order is not defined. The JRC has 1, so you should use at least 2 for your application to be sure that JRC will be started as first.
- Oracle-MIDlet-Restart: [true|false], if true the MIDlet is automatically restarted if it terminates non gracefully, e.g. by an uncaught exception.
- Oracle-MIDlet-Restart-Count: [number], number of allowed MIDlets restarts before the whole module is rebooted
So if the MIDlet is enabled for autostart it ***** to be uninstalled if you don't want it to be started automatically any more.
Regards,
Bartłomiej
Hello Mr. Bartlomiej,
Thanks for your E-mail. Would it be fine to place the autostart related to the MIDlet's jad file by hardcoding it (placing it manually ) ? As far as I remember placing things manually in the .jad files causes problems in running the MIDlet. How can these settings be made in the .jad file by using eclipse ? Usually the jad file looks like created by eclipse :
MIDlet-1: NtripImplement,,NtripImplement
MIDlet-Jar-URL: NtripClient.jar
MIDlet-Name: NtripClient MIDlet Suite
MIDlet-Vendor: MIDlet Suite Vendor
MIDlet-Version: 1.0.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: IMP-NG
MIDlet-Jar-Size: 567578
Best Regards,
Umair
Hello,
In Eclipse you need to open the Application Descriptor from the project tree (Package Explorer or Navigator pane) and add the parameters. Then they will be added automatically to each build.
Some parameters must be placed both in the manifest file inside the jar file and in the jad file and the values must be the same. But in case of these parameters, as I remember, it should also work if you add them manually to the jad file only.
Regards,
Bartłomiej
Hello Mr. Bartlomiej,
I have found the solution. Application Descriptor contains a tab name as User defined in which these settings can be made.
Best Regards,
Umair
Hello,
Yes, you can add the autostart parameters via User Defined tab or by just pasting them on the Application Descriptor tab.
Regards,
Bartłomiej