Detect any app opening and closing


I am trying to build a feature into an app that tracks the opening, closing of apps along with what app it is, time opening, etc and the waking up and locking of the device.

I was not sure if this was found in the ionic native packages and wanted to know if there are any third party packages being used for this.

Please help if someone has used this kind of packages.