언어 설정

Menu
Sites
Language
KeepScreenOnState() seems not working

Hi,

I need the screen to stay on all the time an application is in foreground.

I use PowerManager to set screen on  but it gets dimming after time set in system settings.

    result = Tizen::System::PowerManager::KeepScreenOnState(true,false);

It dosen't returns any error but not work.

Due to doc:

https://developer.tizen.org/documentation/dev-guide

I tried to use:

result = Tizen::System::PowerManager::TurnScreenOn();

 

but it gets no effect - screen is dimming after some time.

 

Of course I put correct privileage in my manifest:

<Privilege>http://tizen.org/privilege/power</Privilege>

 

Is there known any issue with PowerManager?

Sombody know how to prevent screen to go off in Tizen?

 

I test the application on real device.

 

Thanks for any help.

 

Regards

sland

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

5 댓글
Zoltan Puski
Yes, it seems it has a bug: it works only for "second". I have the same problem :( I have PowerManager::KeepScreenOnState(true, true); in my OnForeground(). This is called during startup of my App, it returns E_SUCCESS. But screen goes off after the timeout. Then I unlock the screen, the OnForeground() is called, thus the KeepScreenOnState(true, true) again, and now it WORKS! The screen remains on this time forever. I tried to call KeepScreenOnState() call twice, but does not matter, after startup you cannot prevent the screen lock. ( Someone should log this bug? My device is RD-PQ with 2.1
Slawek Kowalski
It works now. Never call PowerManager::KeepScreenOnStat() in method OnAppInitializing(). Call will be ignored however it returns E_SUCCESS. I put KeepScreenOnState() in OnForeground() and works perfect every time. Thanks zoli for your response.
Zoltan Puski
Good for you, my call is in the OnForeground(), and it does not work, only after my App went to background - as I described in my prev comment. Could be it's my device / current tizen problem, so I will ignore it now...

any success here?

I have reported a buy report now. Wonder why no one did it before!!

 

*bug report