Open Source • Background Tasks: Itoo 🚀

It looks like an extension to detect if the device is in idle/sleep mode does exist:

This extension is supposed to identify also if the device screen is off, so I tried to use it in my app, in order to disable the post of a new notification if my phone is in sleep mode.
Unfortunately, the things do not work fully as expected: if my phone is locked with screen off, it's alright (the notification does not trigger and the screen remains off, that is what I want), but if it is locked and the screen is active, the notification does not refresh. It looks like the lock active + screen on status is detected again as idle/sleep mode...
I would appreciate Anke's opinion also, that has built the extension.