I am looking for an Android application that can keep track of how much time I spent on each application (i.e. counts when the application has the main focus and the phone is being used). If possible, free and also record the number of clicks and keystroke in each application.
I would recommend you check out App Usage Tracker. It does a lot of things that you are looking for:
- Tracks how much time is spent on apps
- It's free
- Data can be exported for viewing later
- Only tracks main window in focus
Right now, it only tracks how much time is spent on a window when it is in focus, but they are working on tracking multi-windows in their next release. You can also customize it to be more accurate and consume more battery or less accurate and consume less battery.
Used Frequency App to solve this problem. Pretty nice app. But not all features are available in free version