The Activity manager is a service that handles user's activities and tracks the resources (documents, e-mails, contacts, web pages etc.) that the user opens.
Activities
The "activity" is an abstract concept which is intended to help the user organize her work. For example, activities can range from general "Web browsing" or "Gaming" to more specific like "Learning Physics 101", "Writing a paper on multi-dimensional fuzzy sets" or "Doing KDE Plasma development".
In Plasma and KWin, activities are exposed as different sets of desktop widgets and windows to allow users to create a per-task experiences with different desktop icons, widgets and applications that are specific to the task at hand etc.
One step more
While this separation was quite useful, it was only the first step. Namely, apart from having only different sets of tools for different tasks, it would be rather nice to have different 'favourite applications' in the application launcher (no point to show KDevelop in an artwork related activity), different recent documents list (why would you need a film you watched the day before while developing software), to show only important contacts for the activity you're in and similar.
The activity manager allows the program developers to be able to react to the changes in the current activity to be able to provide only relevant data.
User activity tracking
The new thing in the current version of the Activity manager, that was a long time in the making, and now is being developed as a part of the KDE Contour project, was the ability of the service to record the user's actions to be able to provide automatic scores to the accessed resources.
One of the things I never liked about the 'recent documents' system is the fact that it usually contains more items that the user will never need again than those that are important. Amarok has a nice way of scoring the songs based on how many times a certain song was listened to, whether it was explicitly chosen to play, whether the playback was interrupted by the user and similar.
We aim to do the same for most resources the user can access, but with some important changes. Currently, the score is calculated using the number of times the resource was opened, for how long it was kept open, and when was the last time the user accessed it.
In the future, the system will be improved by also tracking for how long a certain resource has had the focus. So, if you keep something open, but minimized, it will not get a high score.
This will make the 'recent documents' feature quite irrelevant and replace it with the 'important documents'.
Side-effects
While the main purpose was to have the system be able to understand what is important to the user, there are a few quite nice possibilities that arose from the fact we can now know what documents are open at a specific time.
The first is the global Share-Like-Connect system which will (apart from other things) allow the user to share the currently open document with friends, without the need to open a web browser, or an e-mail/IM client. Just select where you want it posted, or to whom, and all will be done automagically.
The second side-effect will be the ability to develop a truly document-based desktop and mobile environment compared to the today's application-centric systems.