This sample code has been developed by Streamezzo.
Its purpose is to illustrate how to manage screen orientation (portrait / landscape) in MANUAL mode, i.e. driven by the application itself.

In order to emulate this poroject you will need to:
- enable Screen Orientation in the Emulation > Options menu
- set it to "Manual"
- set initial orientation to portrait
Important note:
By default screen orientation is not activated for devices.
Enabling screen orientation requires custom device packages with specific options
activated.
Use Devices > Rich Media Client customizations... to specify such customization.
Then use Service > Create Client Package and select the specified customization to obtain such device packages.
<%@ page import="java.lang.Math" %>
<%
int screenWidth = userAgent.getScreenWidth();
int screenHeight = userAgent.getScreenHeight();
// Important: content is designed as a square box which elements will be displayed or not in either portrait or landscape orientation
int screenDimension = Math.max(screenWidth, screenHeight);
%>
"/>
">
">
">
">
"/>
"/>
| Attachment | Size |
|---|---|
| Screen_orientation_manual.swz | 10.72 KB |