How to detect Device activity on iOS ?

Hi Folks, I would like to know whether it's possible to authorize a 1/3 Party app to have access to any data showing that the device is in activity/in use by the user ?

Thank you for your input ! 🙏🏻❤️

Yes, you can use the FamilyControls framework's AuthorizationCenter to request access to the DeviceActivity framework. Once the user grants your app access to Screen Time data, it can use a DeviceActivityReport rendered by your app's Device Activity Report extension to display usage data for that device.

How to detect Device activity on iOS ?
 
 
Q