Detecting HW button press when app is in the background

Hi all,

I would like to know if it’s possible to build an app, that detects a hardware button press (upper or bottom button) while app is in background or when wearable is locked? It’s preferred that the app is web app, but a native and .net are also acceptable.

Furthermore, I would like to know if it’s possible to detect a long press on the screen, while app is in background or when wearable is locked?

thanks

I guess not possible. An app in background has no rights to HW Back event (lost focus). Maybe you can try with signals by d-bus communication in Native environment.

thank for your opinion. Can somebody else confirm what @andrzej_bugajny said?

thanks