How to set fixed portrait screen orientation for Tizen native application?

Original Created Dec 05, 2016 | Regeneration Apr 22, 2026

I'm developing a native Tizen application and need to lock the screen orientation to portrait mode only. I've checked the tizen-manifest.xml file but couldn't find any relevant tags for screen orientation settings. Could you please advise how to implement this?

Problem Understanding

The user wants to restrict their Tizen native application to portrait orientation only and is looking for the proper implementation method since the tizen-manifest.xml doesn't provide direct configuration for screen orientation.

Solution Methods

  1. Using Elementary Window Rotation API: Tizen provides Elementary API to control window rotation. You can use elm_win_wm_rotation_available_rotations_set to specify allowed orientations.

  2. Implementation Steps:

    • Check if rotation is supported using elm_win_wm_rotation_supported_get()
    • Define an array of allowed rotations (0 for portrait)
    • Set the available rotations with elm_win_wm_rotation_available_rotations_set()

Code Examples

if (elm_win_wm_rotation_supported_get(ad->win)) 
{
    // Array of rotation values (0 = portrait)
    int rots[4] = { 0, 90, 180, 270 };
    
    // Set only portrait mode (0) as available
    // Last parameter (1) indicates only one orientation is allowed
    elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 1);
}

Additional Tips

  • The rotation values correspond to:
    • 0: Portrait (normal)
    • 90: Landscape (90° clockwise)
    • 180: Portrait (upside down)
    • 270: Landscape (270° clockwise)
  • If you want to allow multiple orientations, adjust the last parameter of elm_win_wm_rotation_available_rotations_set() accordingly
  • For more details, refer to the Elementary Window Rotation API documentation on samsungtizenos.com

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.