Screen time tracker app

How to make an screen time tracker app? Any plugins or something?

I want to make an application that will count the time the user spent on the phone and then save it, but I don't know how to get the number of hours on the user's phone using app inventor.

How can i track the screen time on social media aap using mit aap inventor