Languages

Menu
Sites
Language
[Gear 2] block auto screen rotation

Hi,

does anybody know how to block auto screen rotation in Tizen WebApplication on Gear 2? I would like to have everything only in one direction even if I tilt watch.

thanks

Responses

5 Replies
Alex Dem

Hi,
In accordance with dev-guide:
Tizen Wearable Web App Programming > Application Development Process > Creating the Application Project > Setting Widget Configuration
you should set in config.xml appropriate value of the property:  tizen:setting->screen-orientation.
But I was not able to configure the property in IDE 1.0.0b2 (The property was disabled for me).
Alexey.

hyunsoo nam

Hi, Katarzyna.

use this code.

 

screen.lockOrientation("portrait");

 

Katarzyna Stasiak

Cześć,

Włożyłem ten kod przed <body>:

<script type="text/javascript">
window.onload = function () {
  screen.lockOrientation ("portret");
};
</ script>

 

i to nie działa, ekran nadal obracać kiedy przechylić bieg. Czy możesz dać mi cały przykładowy projekt, być może mam coś robić źle.

thx

Katarzyna Stasiak

don't know why previous post was in polish.

should be:

I have put this code before <body>:

<script type="text/javascript"> 
window.onload = function () { 
  screen.lockOrientation ("portret"); 
}; 
</ script>

 

and it is still not working. I am still able to rotate screen when tilt phone. Could you give me sample project, maybe I did sth wrong...

 

thx

Katarzyna Stasiak

I have found solution. You need to disconnect gear from the computer. When it is connected the screen rotation is on, when you disconnect it it is always in one position. 

I think it is a bug