Currently I am developing an application in which I have to monitor certain app in user's phone. I want to check when the user has opened that specific application and when the user has closed it. So basically I want to note the total running time of specific application and taking into notice that user will give any kind of permission that my app requires.
Is there a way to do that or any other alternate solutions?