0

I am searching for an event with that I get weather the screen is turned on or off. In Android there is this nice BroadcastReceiver. Is there anything like that in UWP-Apps?

Kind regards

M4s0n
  • 613
  • 1
  • 7
  • 21
  • [Detect when screen turns off in windows phone](http://stackoverflow.com/questions/7887134/detect-when-screen-turns-off-in-windows-phone) – Reza Aghaei Aug 26 '15 at 13:01
  • The link you posted is only for windows-phone-7 and almost no stuff from then is usable now. – M4s0n Aug 26 '15 at 13:50
  • Possible duplicate of [Check if display is turned off by windows power management](http://stackoverflow.com/questions/6530968/check-if-display-is-turned-off-by-windows-power-management) – Yoav Feuerstein Apr 23 '17 at 13:35

1 Answers1

0

No, its the system level behavior and there is no bridge like BroadcastReceiver to deliver such message into the app. There used to be one for Windows Phone Silverlight but not available on Windows Universal App.

If you simply wants to keep the screen on, try this: RequestActive | requestActive method

James He
  • 397
  • 1
  • 7
  • well that's crap..thanks for your help. Hopefully this will be implemented at some time.. – M4s0n Aug 26 '15 at 13:53
  • You can file feedback with the Windows 10 feedback app (there is a "Developer Platform" option). Please include the scenario where you want to know if the screen is off (eg, is your app in the foreground and wants to keep running, or is it a background task, etc) – Peter Torr - MSFT Aug 28 '15 at 03:16