Can I Detect Which App the User Opens Using the Screen Time API?

I'm working with the Screen Time API in iOS and have successfully implemented the following:

  1. Granted Screen Time Permission: The app asks for and obtains Screen Time permissions without any issues.
  2. Blocked Specific Apps: Using FamilyActivitySelection, I can block access to certain apps.
  3. Monitoring Device Activity: With DeviceActivityCenter().startMonitoring(), I’m able to successfully start monitoring.

DeviceActivityCenter().startMonitoring(.myActivity, during: schedule)

Now, I’m wondering if there’s a way to detect exactly which app the user opens, so I can fire an API from my own app based on that event.

Is this kind of real-time app usage detection possible with the Screen Time API? If so, how might it be implemented?

There's no supported way for you to know which app the user opened as this is a feature of the API that protects privacy. Enterprise and MDM allow for this but nothing int the public SDK for iOS.

Can I Detect Which App the User Opens Using the Screen Time API?
 
 
Q