언어 설정

Menu
Sites
Language
How to keep gear app running when screen is turned off and turned on

Gear is automatically turned off in a few minutes. When I run a gear, my app goes to background.

How to prevent my app going to background?

 

PLUS

 

Are there functions or events like onStart(), onStop(), onResume(), etc for tizen lifecycle?

 

sorry for my poor english..

Responses

3 댓글
Marco Buettner

You should enable background-event on the config.xml...

Events for onStart(), onStop() and onResume() aren't available on Web Framework... For onStart() you can use onload, domready or DOMContentLoaded (will fired if the application start after "termination" state.... for onStop() you can use unload() (will only fired if the applicaton close (terminated))

AVSukhov

Hello,

For onResume() you can use "visibilitychange" event.

Dominik Koleda

Hi,

there is a string value for detecting the application state. For example:

document.visibilityState === 'visible'

As far as i rememer it may be also "hidden".

 

Best regards,

Dominik Koleda