Foreground application time


#1

In my Ionic application how could I record for how much time any application was on foreground?


#2

How about listening to the pause and resume events from Platform, and triggering timers based on that?