Universal Menu and Reserved User Interactions

This section describes the mobile Universal Menu and reserved user interactions including the volume, back, and home buttons.

Reserved User Interactions

Back button, home button, and volume button behaviors must conform to specific requirements.

Volume Button Interactions

Volume adjustment on the Samsung device is handled automatically. The volume control dialog display is also handled automatically by the VrApi as of Mobile SDK 1.0.3. Do not implement your own volume display handling, or users will see two juxtaposed displays.

You may override automatic volume display handling if necessary by setting VRAPI_FRAME_FLAG_INHIBIT_VOLUME_LAYER as an ovrFrameParm flag.

Back Button Interactions

Back button presses are of three types: long-press, short-press, and aborted long-press.

A long-press occurs when the back button is held longer than 0.75 seconds. A short-press is 0.25 seconds or shorter. If a single press of the back button is longer than 0.25 seconds but shorter than 0.75 seconds, it results in an aborted long-press and cancels the Universal Menu timer. A timer animation is displayed from 0.25 to 0.75 seconds, indicating to the user that a long-press in underway.

Long-press on the back button is reserved, and always opens the Universal Menu. As of Mobile SDK 1.0.4, this behavior is handled automatically by the VrApi. You should no longer implement your own long-press back button handling, including gaze timer.

Short-press back button behavior is determined by the application. It is typically (but not necessarily) treated as a generic back action appropriate to the application’s current state.

Back actions usually prompt apps to navigate one level up in an interface hierarchy. For example, a short-press on the back button may bring up the application’s menu. In another application, a short-press may act as a generic back navigation in the UI hierarchy until the root is reached, at which point it may bring up an application-specific menu, or enter the Universal Menu with a confirmation dialog, allowing the user to exit the application to Oculus Home.

In applications built with VrAppFramework or Unity, if no satisfactory stateful condition is identified by the application, the short-press opens the Universal Menu with a confirmation dialog allowing the user to exit the app and return to Oculus Home. Applications built with other engines must implement this handling - see the VrCubeWorld_NativeActivity sample for an example.

Home Button Interactions

A Home button press always opens a dialog to return the user to Oculus Home. As of Mobile SDK 1.0.4, this behavior is handled automatically by the VrApi.

Universal Menu

The Universal Menu provides access to the user's Oculus Profile, friends list, notifications, Settings and Utilities options, and a shortcut to Oculus Home.

The Settings submenu provides volume and brightness controls, a reorientation command, and more. The Utilities submenu provides access to the screenshot and video capture functions and the Pass-Through Camera.

The Universal Menu is part of the Oculus System Activities application which is installed to the user's device along with Oculus Home and the Oculus App. The Universal Menu is activated when the user initiates the relevant reserved button interactions described in Reserved User Interactions.

Universal Menu Implementation

Native apps

In native apps, the application is responsible for hooking the back key short-presses by overloading VrAppInterface::OnKeyEvent() and deciding when the user is at the root of the application’s UI, at which point it should ignore the back key event by returning false. This will allow VrAppFramework to handle the back key and start the Universal Menu quit confirmation dialog.

To display the Universal Menu quit confirmation dialog, the app should call:

vrapi_ShowSystemUI( &app->Java, VRAPI_SYS_UI_CONFIRM_QUIT_MENU );

Unity apps

See OVRPlatformMenu.cs in the Utilities for Unity 5 for sample execution. For more information, see Design Considerations: Universal Menu in our Unity 5 guide.