| ARRIS Enterprises, Inc. Confidential Information |
Multiple Application SupportUsing toish for easier developmentThe toish sec and toish as info commands on the STB are very useful when developing and debugging multi-app support. ssh into the STB and run toish sec list to get a list of the installed secondary applications: ~ # toish sec list WebKit Browser (State: STOPPED) WebGLDemo (State: HIDDEN) The primary application has focus. ~ # Although we only added the You can use toish sec to change the input focus between apps, check which app has focus, and show, hide, start and stop them. You can use toish as info to see detailed info on all installed apps (even non-interactive ones) and their properties. Get application propertiesAs part of its initialization, the portal looks at the available secondary applications to find the icon, and add it to the main menu, as follows: <sdk_root>/examples/example-html-portal/modules/menu/menu.js
The Starting Secondary ApplicationsThe example portal is written to automatically detect, and optionally start, secondary applications with the appropriate properties set. The following code is run for each secondary application as the portal initializes: <sdk_root>/examples/example-html-portal/multiapp.js
The key piece here is the The final part of initializing the portal is to subscribe to various key presses, discussed in the input handling page. CallbacksSince actions like starting, stopping, showing and hiding a secondary application can take some time, and may fail, the TOI AsyncCallback mechanism is used. Calls to <sdk_root>/examples/example-html-portal/multiapp.js
If the start operation completes successfully, the Switching to a secondary applicationWhen switching to a secondary application, the first thing the portal needs to do is determine the state of the secondary. Since the secondary may have previously been stopped, exited, or crashed, it's not guaranteed to be in
<sdk_root>/examples/example-html-portal/multiapp.js
If the application is in When switching to a secondary application, the media player should be closed and put into <sdk_root>/examples/example-html-portal/multiapp.js
If the media player is not in Return to the portalTo return to the portal, the example uses the following callback, providing it to the <sdk_root>/examples/example-html-portal/multiapp.js
The |