Monitor session unlock from sandboxed application

Hello,

can a sandboxed (flatpak) application somehow (e.g. D-Bus signal?) be notified when the Gnome shell session is unlocked, or, alternatively, when the system is resumed from suspend?

My app would need to do some work whenever the user returns to their system after a prolonged period of absence (e.g. next working day).

My application is autostarted via the background portal, so if the user shuts down and then boots their system normally, I end up in the standard startup vfunc of Gtk Application and can act upon it, but that doesn’t work if the user just suspends their system and resume it the next day.

Cheers,
Basti