Is it possible to create an app that knows if other apps are running? For instance could an app be made that tracks data like this: You currently have 3 apps running. You spent the most amount of time this week on the Facebook app: 20 hrs.
Is this possible, or is it impossible to get this data from other iOS apps?
It is not possible to create an application that tracks the status of other application using public APIs provided by Apple.
It may be possible using private APIs, but your app will be rejected upon submission to the app store. Take a look at this post.