Is it possible to track time spent on other apps or using the device?

Not sure if Ionic Native is the best category. I’m looking to create something similar to Moment or Space, or the many other time spent trackers.

Is it possible to implement this with Ionic or does it make more sense just to do this completely natively?