语言

Menu
Sites
Language
How to check Auto Rotation status of mobile in Native application

I am developing a Tizen native app which needs to check auto rotation status of my phone. How can i check this? Is there any api for this ?

查看选择的答案

响应

2 回复
Mark as answer
Mehedi Alamgir
int ret, code;
ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED,&code);

 

If the value of code is 1 , rotation is on and if 0, rotation is off.

 

Hernan Crespo

Thanks a lot. It works nicely.