Hello everyone,
Is it possible to understand when the screen is switched on? I mean, can I grab the event of switching on of the screen and understand if the screen is already on? I'd need it to make my widget update only when screen gets switched on or if it's already turned on. Thanks
Yes, with PhoneEvents. You can use ScreenOn and ScreenOf events.
However these events can only be intercepted when the process is alive. This means that you will need to call Service.StartForeground to prevent Android from killing your process.