Languages

Menu
Sites
Language
How to application always on?

Hello, I have developed stop watch with alarming application at Gear S2(Web app).

But I encountered a huge problem.

The proplem is my application is asleep as over time and display off status. 

So alarm not works although timer works well.

 

 I used vibrator to alarm.

navigator.vibrate(300);

Is there any solution to vibrate in asleep status OR to make my application always on?

 

Thanks, have a nice day. 

View Selected Answer

Responses

4 Replies
Mark as answer
daniel kim

Hi,

I think that you can use this power api to keep the screen always on.

    void request(PowerResource resource, PowerState state);

          enum PowerScreenState { "SCREEN_OFF", "SCREEN_DIM", "SCREEN_NORMAL", "SCREEN_BRIGHT" };

          SCREEN_NORMAL - The minimal screen state is set to NORMAL and device does not change to DIM state automatically.

Regards

Byung geun Lee

Thanks !!

It is so useful and my application works well in my intent.

AVSukhov

Hello,

For this purpose you can use Power API:

https://developer.tizen.org/dev-guide/latest/org.tizen.guides/html/web/tizen/system/power_w.htm

but do not forget to release the selected state after your application is closed or minimized.

Byung geun Lee

Thanks,

your information and comments are so helpful to me!