언어 설정

Menu
Sites
Language
Application goes to sleep mode even if it is executed without touch

How make screen  be on  every time? How it make with right metod?


    	window.onfocus = function(){
		tizen.power.request("SCREEN", "SCREEN_NORMAL");
		};
		
		window.onblur = function(){
		tizen.power.release("SCREEN");
		};


Example under  do not work in not touch game

This is need for gear s

But when i try simply this for testing


    	window.onfocus = function(){
		tizen.power.request("SCREEN", "SCREEN_NORMAL");
		};
	
		 window.onblur = function(){
		tizen.power.request("SCREEN", "SCREEN_NORMAL");
		};

for testing

on my RQ test fon i have got same problem with screen (waves)

and fon turn off

I think i can not use and test screen on or of on emulator, right?

Edited by: Kilim A on 11 4월, 2015

Responses

3 댓글
AVSukhov

Hello,

Instead onfocus and blur events you can use webkitvisibilitychange event:

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.guides/html/web/w3c/perf_opt/page_w.htm

 

You need request power state in your init function (when your page is loaded). And after that you can change state regarding visibilitychange event.

Kilim A

Thanks

how about  emulator? can It  show screen on sreen of in testing?
 

AVSukhov

Hello,

As i known, Power API is mandatory for both Tizen mobile and wearable profiles, which means that it is supported in all mobile and wearable devices.

And all mandatory APIs are supported on the Tizen Emulators.