I don’t think this is the n00bie question you are expecting. :)
I understand we build the OSGI application, and when you start up the bug the activator classes get called. In turn they call their servicetracker. The ServiceTracker can then get a frame, setup the screen etc…
However it seems that if the UI were disposed of then how would the app get started again, and thus the UI be rebuilt? I saw where from the button controls I can get the 1line LCD to show information about the system such as the services, and programs. I was unable to figure out how to select an app and perform some action on it, like to start it. I assume the command line ): I can request it to stop and restart. But that seems a bit user unfriendly to do from a touch screen LCD, or worse from a 1line LCD and 8 buttons.
Are we supposed to do like the menuextender app and place an option on the menu that calls back into the UI start code?
Let me know if I’m missing something.
I’m primarily a web developer here at Bug, so I’m a bit of an SDK n00b myself, but I’ll take a swing at your question.
Using the Activator and ServiceTracker, your application is sorta always running, waiting for its service dependencies. Once its service dependencies are there, it will kick off doStart and do it’s thing.
If you wanted an app that wasn’t running all the time, then you are correct—your Activator could register a menu item or listen for hotkey events. I hope that helps. Def. let me know if it’s still unclear.
Oh and the latest SDK build has a Virtual BUG with two LCD lines.
||When are we getting that SDK Ken? :-)|