Applet Instances | developer.brewmp.com Applet Instances | developer.brewmp.com

Developer

Applet Instances

Forums:

Does Brew ever have 2 instances of the same applet (same classId) running at the same time?

Say my Applet A w/ ClassId A is running. Now, Applet A StartApplet Applet A (itself). What happens? Will there now be 2 instances of Applet A? What would happen to stuff such as app-directed SMS? Which instance would get the message?

Similarly, if Applet A starts Extension E1, then Applet B comes up and also starts Extension E1. Will there now be 2 instances of Extension E1 running?

Another example is Applet A sets an Alarm, User exits Applet A, when Alarm is delivered, Applet A starts itself (EVT_ALARM). What happens if user did not exit Applet A, when the Alarm was delivered? Would StartApplet fail?

Thanks,
:)

You can't have more than one instance of an applet. If you call ISHELL_StartApplet() on an applet that is already started, it will make the applet top-visible. This allows you to resume a suspended applet.
It is possible for an applet to have more than one entry in the app history stack. Check the documentaion on IAppHistory for more info.
-Erik

You can't have more than one instance of an applet. If you call ISHELL_StartApplet() on an applet that is already started, it will make the applet top-visible. This allows you to resume a suspended applet.
It is possible for an applet to have more than one entry in the app history stack. Check the documentaion on IAppHistory for more info.
-Erik