Making a midlet the primary running midlet (giving it highest priority to run) after AT^SJOTAP | Thales IoT Developer Community
October 21, 2022 - 5:36am, 1105 views
I have a PLS62-W modem and a java midlet running on it, let's call it midletA. MidletA among other things performs an OTAP of another midlet, called midletB, using AT^SJOTAP successfully but after reboot midletA is still the primary running midlet. I used AT^SJAM=5 and AT^SJAM=4 and can see that both midlets are installed and running but the primary running midlet is still midletA which was installed using AT^SJAM=0. Both midlets have autostart on. I tried playing with the autostart order but that doesn't help. Is there a way to prioritise midletB to run? (P.S. The midlets have different names)
Hello,
I'm not sure what you mean by the priority and primary running MIDlet. And what you would like to achieve. After the reboot all MIDlets enabled for autostart will be started. And you can influence the order by setting different values for Oracle-MIDlet-Autostart parameter in the jad file. You can also start or stop the other MIDlets by AT commands.
Regards,
Bartłomiej
Hello,
What I mean is that even though both midlets are technically running, midletA still has control of gpio ports, debug output and everything else. I see no indication that midletB is running at all even though AT^SJAM=5 and AT^SJAM=4 says so
I would say that it totally depends on your implementation - midletA can access the interfaces and midletB can do nothing. midletB can be even stopped by midletA and run when needed. As long as there is no conflicts in accessing the same resources (by design) it is all fine. If there is a need to implement the communication between there could be PipeConnection used or files on the file system or RecordStore.