When I've tried to publish my tizen web app I was rejected. There is the purpose:
Defect
The application goes to sleep mode even if it is executed without touch.
Procedure
- Execute the ->Start to watch some movie
- Do not touch the screen
- Check whether the application goes to sleep mode
Expected Result
The application should not go to sleep mode because the user wants to execute it without touch.
I think that this is a tizen webkit bug. Nevertheless I've tried to request CPU_AWAKE
and SCREEN_NORMAL
power state programmatically. And this wasn't helped to me. Is this really a bug or I do something wrong?
Device: Ref.Device-PQ. Tizen version: 2.2.0
Yes It works fine but when watching video doesn't works fine. After some time screen turns off. Try to watch some film for continious time (for example 1 - 2 hours). If web app runtime and tizen browser have equal webkit I think you can test it here: http://www.zoomby.ru/mobile/watch/millioner-iz-truscheb. Simply start watching video. In all other platforms(android, ios, desctop) screen doesn't turn off. But in Tizen screen turns off. I think this is a bug. And also I can give yoy my web app and you can test it on tizen web runtime.
By the way I use power api in this way:
tizen.power.request("SCREEN", "SCREEN_NORMAL");
tizen.power.request('CPU', 'CPU_AWAKE');
var _onTimeUpdate = function(){
tizen.power.request("SCREEN", "SCREEN_NORMAL");
tizen.power.request('CPU', 'CPU_AWAKE');
};
video.on('timeupdate', _onTimeUpdate);
// comment: on opening page containing video element I request power states SCREEN_NORMAL and CPU_AWAKE (I won't release for test purpose). Also I request those powser states on timeupdate because I've noticed that when video plays\pauses power state releases.
P.S.: I've noticed that even when I requst power state SCREEN_NORMAL and CPU_AWAKE and not RELEASE them and when bug occurs (when watching video screen turns off) CPU whatever works without sleep. It's obviosly because in this state (screen off and video doesn't plaing) my 100% charged battery is down in 1-2 ours.