Mobile Development 10.11 | webMethods Mobile SuiteWeb Help | Using webMethods Mobile Designer | Creating Mobile Application Projects | Coding a Mobile Application | Orientation API
 
Orientation API
As of Mobile Designer 10.3, Fix 5, orientation mode can only be specified at runtime. By default, screen orientation is not locked to one specific position and rotates together with the device. To lock screen orientation to portrait mode, you can override the init() method of the MDApplication class with the following code:
IOrientationService orientationService = (IOrientationService)
getService(IMDApplication.ORIENTATION_SERVICE);
orientationService.lock(IOrientationService.ORIENTATION_PORTRAIT);
The Orientation API deprecates the following properties:
*project.handset.landscape.mode
*project.handset.orientation.limiter
*project.handset.portrait.mode.orientation