onPause called, but application is still in foreground

On Tizen Wearable, there is a flow of a general application:

  1. Application is started by user
  2. Screen turns off (timeout without activity from user), onPause is called
  3. Application is put into recents => when screen turns back on again, application is not visible, but you can find it in recents

This is fine, but how can I get a notification from the system that this happened to my application?

Versus this scenario:

  1. Application is started by user
  2. Screen turns off (timeout without activity from user), onPause is called
  3. Screen turns back on (activity from user): application is still visible, onResume called.

I want to quit from my application if it’s not visible anymore, but for this onPause is not suitable as it’s also being called when only the screen turns off.

Hello,
I think you can achieve the scenario by using visibility status event listener. Please check out the link below:

https://docs.tizen.org/application/web/guides/w3c/perf-opt/page/

Thanks, I forgot to mention that I’m looking for a native C/C++ way. :slight_smile:

Hello,
To check the screen state, please follow the mentioned code snippet-

1 Like