Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
Android Guides
Menus

Video Streaming Menu

When building a video-streaming navigation application, you can choose to create a custom menu using your own UI or use the built-in SDL menu system. The SDL menu allows you to display a menu structure so users can select menu options or submenus. For more information about the SDL menu system, see menus. It's recommended to use the built-in SDL menu system to have better performance, automatic driver distraction support - such as list limitations and text sizing, and more.

To open the SDL built-in menu from your video streaming UI, see 'Opening the Built-In Menu' below.

Opening the Built-In Menu

The Show Menu RPC allows you to open the menu programmatically. That way, you can open the menu from your own UI.

Show Top Level Menu

To show the top level menu use sdlManager.screenManager.openMenu.

sdlManager.getScreenManager().openMenu();

Show Sub-Menu

You can also open the menu directly to a sub-menu. This is further down the tree than the top-level menu. To open a sub-menu, pass a cell that contains sub-cells. If the cell has no sub-cells the method call will fail.

Note

The sub-cell you use in openSubMenu must be included in sdlManager.screenManager.menu array. If it is not included in the array, the method call will fail.

sdlManager.getScreenManager().openSubMenu(cellWithSubCells);

Close Application

If you choose to not use the built-in SDL menu system and instead want to use your own menu UI, you need to have a way for users to close your application. This should be done through a menu option in your UI that sends the CloseApplication RPC.

Note

This RPC is unnecessary if you are using OpenMenu because OEMs will take care of providing a close button into your menu themselves.

CloseApplication closeApplication = new CloseApplication();
sdlManager.sendRPC(closeApplication);
View on GitHub.com
Previous Section Next Section